Honor enableFlashMessages config param in PasswordRecoveryService #110
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
- Enh #143: Introduced "conflict" configuration in composer.json (maxxer)
|
||||
- Enh #145: Allowed the `+` sign in username (maxxer)
|
||||
- Bug #9: Documentation about migration from Dektrium tools (maxxer)
|
||||
- Bug #110: Honor `enableFlashMessages` in `PasswordRecoveryService` (maxxer)
|
||||
|
||||
## 1.1.1 - November 27, 2017
|
||||
- Bug #115: Convert client_id to string because pgsql fail with type convertion (Dezinger)
|
||||
|
||||
@ -16,12 +16,14 @@ use Da\User\Factory\TokenFactory;
|
||||
use Da\User\Model\User;
|
||||
use Da\User\Query\UserQuery;
|
||||
use Da\User\Traits\MailAwareTrait;
|
||||
use Da\User\Traits\ModuleAwareTrait;
|
||||
use Exception;
|
||||
use Yii;
|
||||
|
||||
class PasswordRecoveryService implements ServiceInterface
|
||||
{
|
||||
use MailAwareTrait;
|
||||
use ModuleAwareTrait;
|
||||
|
||||
protected $query;
|
||||
|
||||
@ -58,10 +60,12 @@ class PasswordRecoveryService implements ServiceInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->getModule()->enableFlashMessages == true) {
|
||||
Yii::$app->session->setFlash(
|
||||
'info',
|
||||
Yii::t('usuario', 'An email has been sent with instructions for resetting your password')
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user