mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Don't claim that there's an invalid password if no password is set - members may be created for newsletters, etc.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63506 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cba8e71170
commit
2a392ef61c
@ -978,13 +978,13 @@ class Member extends DataObject {
|
|||||||
$valid = parent::validate();
|
$valid = parent::validate();
|
||||||
|
|
||||||
if(!$this->ID || (isset($this->changed['Password']) && $this->changed['Password'])) {
|
if(!$this->ID || (isset($this->changed['Password']) && $this->changed['Password'])) {
|
||||||
if(self::$password_validator) {
|
if($this->Password && self::$password_validator) {
|
||||||
$valid->combineAnd(self::$password_validator->validate($this->Password, $this));
|
$valid->combineAnd(self::$password_validator->validate($this->Password, $this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!$this->ID && $this->SetPassword) || (isset($this->changed['SetPassword']) && $this->changed['SetPassword'])) {
|
if((!$this->ID && $this->SetPassword) || (isset($this->changed['SetPassword']) && $this->changed['SetPassword'])) {
|
||||||
if(self::$password_validator) {
|
if($this->SetPassword && self::$password_validator) {
|
||||||
$valid->combineAnd(self::$password_validator->validate($this->SetPassword, $this));
|
$valid->combineAnd(self::$password_validator->validate($this->SetPassword, $this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user