mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX fix issue where member without valid email can not be saved
It is possible to have a member record without a valid email address. In this case, you can not save Member as it throws an error (email is tried being sent without a valid email address).
This commit is contained in:
parent
6cb35972c9
commit
675ba90280
@ -774,7 +774,7 @@ class Member extends DataObject
|
|||||||
if ((Director::isLive() || Injector::inst()->get(MailerInterface::class) instanceof TestMailer)
|
if ((Director::isLive() || Injector::inst()->get(MailerInterface::class) instanceof TestMailer)
|
||||||
&& $this->isChanged('Password')
|
&& $this->isChanged('Password')
|
||||||
&& $this->record['Password']
|
&& $this->record['Password']
|
||||||
&& $this->Email
|
&& Email::is_valid_address($this->Email ?? '')
|
||||||
&& static::config()->get('notify_password_change')
|
&& static::config()->get('notify_password_change')
|
||||||
&& $this->isInDB()
|
&& $this->isInDB()
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user