Merge pull request #593 from nextcloud/ldap-avoidneedlesssetemailonlogin-stable10
[stable10] Prevent setting email and triggering events at login time (#25554)
This commit is contained in:
commit
481418ff40
|
@ -435,10 +435,13 @@ 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)) {
|
||||||
|
$currentEmail = $user->getEMailAddress();
|
||||||
|
if ($currentEmail !== $email) {
|
||||||
$user->setEMailAddress($email);
|
$user->setEMailAddress($email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fetches the quota from LDAP and stores it as ownCloud user value
|
* fetches the quota from LDAP and stores it as ownCloud user value
|
||||||
|
|
Loading…
Reference in New Issue