Merge pull request #542 from nextcloud/enh/noid/user-system-mail-getter

This commit is contained in:
John Molakvoæ 2021-09-08 18:54:28 +02:00 committed by GitHub
commit 6e8866c1be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -637,7 +637,7 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
}
if ($user !== null) {
$currentEmail = (string)$user->getEMailAddress();
$currentEmail = (string)(method_exists($user, 'getSystemEMailAddress') ? $user->getSystemEMailAddress() : $user->getEMailAddress());
if ($newEmail !== null
&& $currentEmail !== $newEmail) {
$user->setEMailAddress($newEmail);