[-] BO : #PSCFV-2556 #PSCFV-2550 - Fix password alert message "é"

This commit is contained in:
mDeflotte
2012-05-24 13:20:50 +00:00
parent 4d6cee24e2
commit 1a8088fcd9
2 changed files with 21 additions and 19 deletions
+20 -18
View File
@@ -203,29 +203,31 @@ class AdminLoginControllerCore extends AdminController
$pwd = Tools::passwdGen();
$employee->passwd = md5(pSQL(_COOKIE_KEY_.$pwd));
$employee->last_passwd_gen = date('Y-m-d H:i:s', time());
$result = $employee->update();
if (!$result)
$this->errors[] = Tools::displayError('An error occurred during your password change.');
else
$params = array(
'{email}' => $employee->email,
'{lastname}' => $employee->lastname,
'{firstname}' => $employee->firstname,
'{passwd}' => $pwd
);
if (Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'password', Mail::l('Your new admin password', (int)Configuration::get('PS_LANG_DEFAULT')), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
{
$params = array(
'{email}' => $employee->email,
'{lastname}' => $employee->lastname,
'{firstname}' => $employee->firstname,
'{passwd}' => $pwd
);
if (Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'password', Mail::l('Your new admin password', (int)Configuration::get('PS_LANG_DEFAULT')), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
die(Tools::jsonEncode(array(
'hasErrors' => false,
'confirm' => $this->l('Your password has been e-mailed to you')
)));
// Update employee only if the mail can be sent
$result = $employee->update();
if (!$result)
$this->errors[] = Tools::displayError('An error occurred during your password change.');
else
die(Tools::jsonEncode(array(
'hasErrors' => true,
'errors' => array(Tools::displayError('An error occurred during your password change.'))
'hasErrors' => false,
'confirm' => $this->l('Your password has been e-mailed to you', 'AdminTab', false, false)
)));
}
else
die(Tools::jsonEncode(array(
'hasErrors' => true,
'errors' => array(Tools::displayError('An error occurred during your password change.'))
)));
}
else if (Tools::isSubmit('ajax'))
+1 -1
View File
@@ -1621,7 +1621,7 @@ $_LANGADM['AdminLogin345d82a66ff0b2acff929bbab85ed936'] = 'renommé le dossier /
$_LANGADM['AdminLogin34bdd7b9823059fa742afab7be9d4c58'] = 'Votre mot de passe vous a été envoyé par e-mail';
$_LANGADM['AdminLogin362b56674d07160fab60725a927bbf13'] = 'supprimé le dossier /install';
$_LANGADM['AdminLogin463e58c1d35fb5a4a8d717c99a60d257'] = 'Retour à la connexion';
$_LANGADM['AdminLogin485f5be5d5e3cd5d46ab3cd3792765c8'] = 'Veuillez saisir l\'adresse e-mail indiquée à lors de votre inscription afin de recevoir vos codes d\'accès par e-mail.';
$_LANGADM['AdminLogin485f5be5d5e3cd5d46ab3cd3792765c8'] = 'Veuillez saisir l\'adresse e-mail indiquée lors de votre inscription afin de recevoir vos codes d\'accès par e-mail.';
$_LANGADM['AdminLogin4ce81305b7edb043d0a7a5c75cab17d0'] = 'Il y a';
$_LANGADM['AdminLogin6357d3551190ec7e79371a8570121d3a'] = 'Il y a';
$_LANGADM['AdminLogin69f4ac57f3127f55fffc6a5e65fd2a21'] = 'Veuillez alors accéder à la page par la nouvelle URL, par exemple http://www.domaine.fr/admin123%d';