diff --git a/src/User/Service/PasswordRecoveryService.php b/src/User/Service/PasswordRecoveryService.php index 9d6e2db..0e5b597 100644 --- a/src/User/Service/PasswordRecoveryService.php +++ b/src/User/Service/PasswordRecoveryService.php @@ -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(); diff --git a/src/User/Service/UserCreateService.php b/src/User/Service/UserCreateService.php index 60ff7eb..26b9f59 100644 --- a/src/User/Service/UserCreateService.php +++ b/src/User/Service/UserCreateService.php @@ -75,8 +75,8 @@ class UserCreateService implements ServiceInterface 'Error sending welcome message to "{email}". Please try again later.', ['email' => $model->email] ); - // from web display a flash message (if enabled) - if ($this->getModule()->enableFlashMessages === true && is_a(Yii::$app, yii\web\Application::class)) { + // from web generate a flash message + if (is_a(Yii::$app, yii\web\Application::class)) { Yii::$app->session->setFlash( 'warning', $error_msg