mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Prevent reuse of previous password
git-svn-id: file:///svn/phpbb/trunk@6424 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -83,6 +83,12 @@ class ucp_profile
|
||||
$error[] = 'CUR_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
// Only check the new password against the previous password if there have been no errors
|
||||
if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $new_password && md5($new_password) == $user->data['user_password'])
|
||||
{
|
||||
$error[] = 'SAME_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
if ($auth->acl_get('u_chgemail') && $email != $user->data['user_email'] && $email_confirm != $email)
|
||||
{
|
||||
$error[] = 'NEW_EMAIL_ERROR';
|
||||
|
@@ -368,6 +368,7 @@ $lang = array_merge($lang, array(
|
||||
'RULE_DELETED' => 'Rule successfully removed',
|
||||
'RULE_NOT_DEFINED' => 'Rule not correctly specified',
|
||||
|
||||
'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password',
|
||||
'SEARCH_YOUR_POSTS' => 'Show your posts',
|
||||
'SEND_PASSWORD' => 'Send password',
|
||||
'SENT_AT' => 'Sent at',
|
||||
|
Reference in New Issue
Block a user