diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-11-14 19:01:15 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-11-14 19:01:15 +0100 |
| commit | 2761a993ffeed0192cecd652301c3c7459eab011 (patch) | |
| tree | 54fff096f269530de8542c450af31e71b456d8c7 /phpBB/includes/ucp | |
| parent | 34ed1352a63ece56185410385a81d881beb25731 (diff) | |
| parent | 69f943c8d6884365165bd222b80feccbf4e70d6f (diff) | |
| download | forums-2761a993ffeed0192cecd652301c3c7459eab011.tar forums-2761a993ffeed0192cecd652301c3c7459eab011.tar.gz forums-2761a993ffeed0192cecd652301c3c7459eab011.tar.bz2 forums-2761a993ffeed0192cecd652301c3c7459eab011.tar.xz forums-2761a993ffeed0192cecd652301c3c7459eab011.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/9361] View correct error messages when editing account information
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 4572dfd25d..6cbb539824 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -79,14 +79,14 @@ class ucp_profile $error = validate_data($data, $check_ary); - if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password']) + if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email']) { - $error[] = 'NEW_PASSWORD_ERROR'; + $error[] = ($data['email_confirm']) ? 'NEW_EMAIL_ERROR' : 'NEW_EMAIL_CONFIRM_EMPTY'; } - if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password'])) + if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password']) { - $error[] = 'CUR_PASSWORD_ERROR'; + $error[] = ($data['password_confirm']) ? 'NEW_PASSWORD_ERROR' : 'NEW_PASSWORD_CONFIRM_EMPTY'; } // Only check the new password against the previous password if there have been no errors @@ -95,9 +95,9 @@ class ucp_profile $error[] = 'SAME_PASSWORD_ERROR'; } - if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email']) + if (!phpbb_check_hash($data['cur_password'], $user->data['user_password'])) { - $error[] = 'NEW_EMAIL_ERROR'; + $error[] = ($data['cur_password']) ? 'CUR_PASSWORD_ERROR' : 'CUR_PASSWORD_EMPTY'; } if (!check_form_key('ucp_reg_details')) |
