Skip to content

Commit

Permalink
[User accounts] New user email with pwd generation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Jun 30, 2020
1 parent 178e8d8 commit d4de329
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/user_accounts/php/edit_user.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,15 @@ class Edit_User extends \NDB_Form
}

// Make sure the user is not using their username as their password.
if ((isset($values['UserID'])
if (
// New user and Make user name match email address not checked
(isset($values['UserID']) && !isset($values['NA_UserID'])
&& $values['UserID'] === $values['Password_hash'])

// New user and Make user name match email address checked
// case already handled in email/password check

// Edit user
|| (!empty($this->identifier)
&& $this->identifier === $values['Password_hash'])
) {
Expand Down

0 comments on commit d4de329

Please # to comment.