Merge branch '4.11' into 4

This commit is contained in:
Steve Boyd 2022-05-18 13:43:06 +12:00
commit 6c5448b70f
3 changed files with 8 additions and 3 deletions

View File

@ -25,6 +25,7 @@
"bramus/monolog-colored-line-formatter": "^2",
"composer/installers": "^1 || ^2",
"composer/semver": "^1 || ^3",
"guzzlehttp/guzzle": "^7",
"guzzlehttp/psr7": "^2",
"embed/embed": "^4",
"league/csv": "^8 || ^9",

View File

@ -914,7 +914,7 @@ class Member extends DataObject
&& static::config()->get('notify_password_change')
&& $this->isInDB()
) {
Email::create()
$email = Email::create()
->setHTMLTemplate('SilverStripe\\Control\\Email\\ChangePasswordEmail')
->setData($this)
->setTo($this->Email)
@ -922,8 +922,10 @@ class Member extends DataObject
__CLASS__ . '.SUBJECTPASSWORDCHANGED',
"Your password has been changed",
'Email subject'
))
->send();
));
$this->extend('updateChangedPasswordEmail', $email);
$email->send();
}
// The test on $this->ID is used for when records are initially created. Note that this only works with

View File

@ -242,6 +242,8 @@ class LostPasswordHandler extends RequestHandler
))
->addData('PasswordResetLink', Security::getPasswordResetLink($member, $token))
->setTo($member->Email);
$member->extend('updateForgotPasswordEmail', $email);
return $email->send();
}