diff --git a/docs/enhancing-and-overriding/overriding-controllers.md b/docs/enhancing-and-overriding/overriding-controllers.md index 186c7c2..1ba1c98 100644 --- a/docs/enhancing-and-overriding/overriding-controllers.md +++ b/docs/enhancing-and-overriding/overriding-controllers.md @@ -20,6 +20,7 @@ Please, before you override a controller's action, make sure that it won't be en 'on ' . \Da\User\Event\ResetPasswordEvent::EVENT_AFTER_RESET => function (\Da\User\Event\ResetPasswordEvent $event) { if ($event->token->user ?? false) { \Yii::$app->user->login($event->token->user); + \Yii::$app->session->setFlash('success', Yii::t('usuario', 'Password has been changed')); } \Yii::$app->controller->redirect(\Yii::$app->getUser()->getReturnUrl()); \Yii::$app->end();