Skip to content

Commit

Permalink
Merge pull request #23546 from ixiam/skip-constraint
Browse files Browse the repository at this point in the history
dev/core#3467 - Drupal 8 - Skip requirement for password when changing your own civi contact's email
  • Loading branch information
demeritcowboy authored May 27, 2022
2 parents b2f942c + 51a775e commit ba02783
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 ba02783

Please sign in to comment.