Improve forget password behaviour
Notify the user that an email has been sent or not.
This commit is contained in:
@@ -104,7 +104,7 @@ class PasswordResetController extends BaseController
|
||||
*
|
||||
* @param string $username
|
||||
*/
|
||||
private function sendEmail($username)
|
||||
protected function sendEmail($username)
|
||||
{
|
||||
$token = $this->passwordResetModel->create($username);
|
||||
|
||||
@@ -117,13 +117,17 @@ class PasswordResetController extends BaseController
|
||||
t('Password Reset for Kanboard'),
|
||||
$this->template->render('password_reset/email', array('token' => $token))
|
||||
);
|
||||
|
||||
$this->flash->success(t('A link to reset your password has been sent by email.'));
|
||||
} else {
|
||||
$this->flash->failure(t('Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check feature availability
|
||||
*/
|
||||
private function checkActivation()
|
||||
protected function checkActivation()
|
||||
{
|
||||
if ($this->configModel->get('password_reset', 0) == 0) {
|
||||
throw AccessForbiddenException::getInstance()->withoutLayout();
|
||||
|
||||
Reference in New Issue
Block a user