Skip to content
Snippets Groups Projects
Unverified Commit ba027838 authored by DaveD's avatar DaveD Committed by GitHub
Browse files

Merge pull request #23546 from ixiam/skip-constraint

#3467 - Drupal 8 - Skip requirement for password when changing your own civi contact's email
parents b2f942c5 51a775e7
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,9 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment