aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-10-01 16:12:53 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-10-01 16:12:53 +0000
commitfd0b2e7df328ad7a7f210b79b2861c8b551ae761 (patch)
tree66372a1f7e26513bdc8c3cbb5a24fd05640ca0f2 /phpBB/includes
parentc42b75d1bc1154c849b5f55becfc42452242c86d (diff)
downloadforums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar
forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.gz
forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.bz2
forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.xz
forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.zip
Prevent reuse of previous password
git-svn-id: file:///svn/phpbb/trunk@6424 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php6
1 files changed, 6 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';