Browse Source

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 <carl@carlschwan.eu>
pull/34629/head
Carl Schwan 3 years ago
committed by Vincent Petry
parent
commit
7f44a66296
No known key found for this signature in database GPG Key ID: E055D6A4D513575C
  1. 2
      apps/settings/lib/Controller/UsersController.php

2
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()) {

Loading…
Cancel
Save