aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php6
-rw-r--r--phpBB/language/en/ucp.php1
2 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index e9ef944986..15c7699253 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -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';
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index c5838bd015..af50607972 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -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',