Skip to content

Commit

Permalink
Fix user can't change email when enter password - Refs #7942
Browse files Browse the repository at this point in the history
  • Loading branch information
jloguercio committed Nov 21, 2015
1 parent 5eaf7e1 commit be05ad2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/auth/profile.php
Expand Up @@ -500,8 +500,10 @@ function check_user_email($email) {
$validPassword = false;
$passwordWasChecked = false;
if ($user &&
!empty($user_data['password0']) &&
!empty($user_data['password1'])
(!empty($user_data['password0']) &&
!empty($user_data['password1'])) ||
(!empty($user_data['password0']) &&
api_get_setting('profile', 'email') == 'true')
) {
$passwordWasChecked = true;
$validPassword = UserManager::isPasswordValid(
Expand Down

0 comments on commit be05ad2

Please sign in to comment.