Merge pull request #594 from nextcloud/ldap-avoidneedlesssetemailonlogin-stable9

[stable9] Prevent setting email and triggering events at login time (#25531)
This commit is contained in:
Morris Jobke 2016-08-01 18:22:43 +02:00 committed by GitHub
commit 76d76121ae
1 changed files with 4 additions and 1 deletions

View File

@ -434,7 +434,10 @@ class User {
}
if(!is_null($email)) {
$user = $this->userManager->get($this->uid);
$user->setEMailAddress($email);
$currentEmail = $user->getEMailAddress();
if ($currentEmail !== $email) {
$user->setEMailAddress($email);
}
}
}