From ff6279edab216415d2f33e92811aeb518b435b97 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 17 Oct 2022 12:41:38 +0200 Subject: [PATCH] Fix case sensitivity of email when saving settings Otherwise we detect a email change all the time and since email are immutable in ldap this prevent updating other fields. Related: https://github.com/nextcloud/server/pull/33813 Signed-off-by: Carl Schwan --- apps/settings/lib/Controller/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 6be93d6a3a03d..3a43442bda4cf 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -484,7 +484,7 @@ protected function saveUserSettings(IAccount $userAccount): void { $oldEmailAddress = $userAccount->getUser()->getSystemEMailAddress(); $oldEmailAddress = strtolower((string)$oldEmailAddress); - if ($oldEmailAddress !== $userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getValue()) { + if ($oldEmailAddress !== strtolower($userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getValue())) { // this is the only permission a backend provides and is also used // for the permission of setting a email address if (!$userAccount->getUser()->canChangeDisplayName()) {