From 7f44a66296b7d8b21c1fec92339afb009fa8318a Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 17 Oct 2022 12:41:38 +0200 Subject: 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 7c543508496..217abf0e156 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -491,7 +491,7 @@ class UsersController extends Controller { $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()) { -- cgit v1.2.3