Skip to content

Commit

Permalink
Skip requirement for password when changing the current user fields
Browse files Browse the repository at this point in the history
  • Loading branch information
CsarRamos committed May 27, 2022
1 parent 4833557 commit 51a775e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Utils/System/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public function updateCMSName($ufID, $email) {
if ($user && $user->getEmail() != $email) {
$user->setEmail($email);

// Skip requirement for password when changing the current user fields
$user->_skipProtectedUserFieldConstraint = TRUE;

if (!count($user->validate())) {
$user->save();
}
Expand Down

0 comments on commit 51a775e

Please sign in to comment.