Skip to content

Commit

Permalink
Fix case sensitivity of email when saving settings
Browse files Browse the repository at this point in the history
Otherwise we detect a email change all the time and since email are
immutable in ldap this prevent updating other fields.

Related: #33813

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
  • Loading branch information
CarlSchwan committed Oct 17, 2022
1 parent 7524b11 commit ef97425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit ef97425

Please sign in to comment.