summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-29 20:47:00 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-29 20:47:00 -0500
commita5a9bd56b7fef8dfe8c2a9e90aac50ce7371da01 (patch)
tree28418a00a5814210967f2f821c6940eebba99b43 /app/Controller
parentda3110ec8b02c77b659385a400d31d32e708fd3f (diff)
Improve forget password behaviour
Notify the user that an email has been sent or not.
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/PasswordResetController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controller/PasswordResetController.php b/app/Controller/PasswordResetController.php
index 6189f946..cc0755ca 100644
--- a/app/Controller/PasswordResetController.php
+++ b/app/Controller/PasswordResetController.php
@@ -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();