Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions models/RecoveryForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,22 @@ public function sendRecoveryMessage()
if (!$this->mailer->sendRecoveryMessage($user, $token)) {
return false;
}
}

\Yii::$app->session->setFlash(
'info',
\Yii::t('user', 'An email has been sent with instructions for resetting your password')
);
\Yii::$app->session->setFlash(
'info',
\Yii::t('user', 'An email has been sent with instructions for resetting your password')
);

return true;
} else {
\Yii::$app->session->setFlash(
'warning',
\Yii::t('user', 'Email could not been sent.')
);

return false;
}

return true;
}

/**
Expand Down
24 changes: 17 additions & 7 deletions models/ResendForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,25 @@ public function resend()
]);
$token->save(false);
$this->mailer->sendConfirmationMessage($user, $token);

\Yii::$app->session->setFlash(
'info',
\Yii::t(
'user',
'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.'
)
);
} else {
\Yii::$app->session->setFlash(
'warning',
\Yii::t(
'user',
'Could not send message to the given email address. Please register or resend password.'
)
);

}

\Yii::$app->session->setFlash(
'info',
\Yii::t(
'user',
'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.'
)
);

return true;
}
Expand Down