Improve forget password behaviour
Notify the user that an email has been sent or not.
This commit is contained in:
parent
da3110ec8b
commit
a5a9bd56b7
|
|
@ -3,6 +3,7 @@ Version 1.0.39 (unreleased)
|
|||
|
||||
Improvements:
|
||||
|
||||
* Improve forget password behaviour (notify the user that an email has been sent or not)
|
||||
* Do not display current project in board selector
|
||||
* Do not set default task assignee for team projects
|
||||
* Comments are highlighted if hash (#comment-123) is present in URL
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
'Credentials' => 'Anmeldeinformationen',
|
||||
'New user' => 'Neuer Benutzer',
|
||||
'This username is already taken' => 'Dieser Benutzername ist bereits vergeben',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
'Credentials' => 'Informations d\'identification',
|
||||
'New user' => 'Nouvel utilisateur',
|
||||
'This username is already taken' => 'Ce nom d\'utilisateur est déjà pris',
|
||||
'A link to reset your password has been sent by email.' => 'Un lien pour réinitialiser votre mot de passe a été envoyé par email.',
|
||||
'Your profile must have a valid email address.' => 'Votre profil doit avoir une adresse e-mail valide.',
|
||||
'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => 'Malheureusement, nous ne pouvons pas réinitialiser votre mot de passe. Avez-vous saisi un nom d\'utilisateur valide ? Avez-vous une adresse e-mail dans votre profil ?',
|
||||
'TRL - Turkish Lira' => 'TRL - Livre turque',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
'Credentials' => 'Credenciais',
|
||||
'New user' => 'Novo utilizador',
|
||||
'This username is already taken' => 'Este nome de usuário já foi utilizado',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
'New user' => 'Добавить пользователя',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1307,4 +1307,8 @@ return array(
|
|||
// 'Credentials' => '',
|
||||
// 'New user' => '',
|
||||
// 'This username is already taken' => '',
|
||||
// 'A link to reset your password has been sent by email.' => '',
|
||||
// 'Your profile must have a valid email address.' => '',
|
||||
// 'Unfortunately, we are unable to reset your password. Did you entered a valid username? Do you have an email address in your profile?' => '',
|
||||
// 'TRL - Turkish Lira' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('autofocus', 'required')) ?>
|
||||
<p class="form-help"><?= t('Your profile must have a valid email address.') ?></p>
|
||||
|
||||
<?= $this->form->label(t('Enter the text below'), 'captcha') ?>
|
||||
<img src="<?= $this->url->href('CaptchaController', 'image') ?>" alt="Captcha">
|
||||
|
|
|
|||
Loading…
Reference in New Issue