Always create flash messages, allow enableFlashMessages only to dictate display
Fixed inconsistent handling of flash messages and the `enableFlashMessages` config setting (#391)
This commit is contained in:
@ -41,12 +41,10 @@ class PasswordRecoveryService implements ServiceInterface
|
||||
public function run()
|
||||
{
|
||||
try {
|
||||
if ($this->getModule()->enableFlashMessages == true) {
|
||||
Yii::$app->session->setFlash(
|
||||
'info',
|
||||
Yii::t('usuario', 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.', ['email' => $this->email, 'appName' => Yii::$app->name])
|
||||
);
|
||||
}
|
||||
Yii::$app->session->setFlash(
|
||||
'info',
|
||||
Yii::t('usuario', 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.', ['email' => $this->email, 'appName' => Yii::$app->name])
|
||||
);
|
||||
|
||||
/** @var User $user */
|
||||
$user = $this->query->whereEmail($this->email)->one();
|
||||
|
||||
Reference in New Issue
Block a user