Merge pull request #592 from nextcloud/ldap-avoidneedlesssetemailonlogin

Prevent setting email and triggering events at login time (#25553)
This commit is contained in:
Lukas Reschke 2016-07-28 17:09:59 +02:00 committed by GitHub
commit bf7afcdace
1 changed files with 4 additions and 1 deletions

View File

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