diff options
author | Robin Appelman <robin@icewind.nl> | 2020-10-27 14:56:52 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-10-27 20:25:30 +0000 |
commit | fdc70c08c6b37cccfe1e69c6228ddee1c374c6e5 (patch) | |
tree | 19f65b748c094d9671fd080fab2975e75143c734 /apps | |
parent | fe8e238df2a9cecf31e0f8354a04186fd1a6cba9 (diff) | |
download | nextcloud-server-fdc70c08c6b37cccfe1e69c6228ddee1c374c6e5.tar.gz nextcloud-server-fdc70c08c6b37cccfe1e69c6228ddee1c374c6e5.zip |
save email as lower case
email addresses are case insensitive
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index d6410810d80..9f832a5ec4a 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -343,6 +343,7 @@ class UsersController extends Controller { $twitter, $twitterScope ) { + $email = strtolower($email); if (!empty($email) && !$this->mailer->validateMailAddress($email)) { return new DataResponse( [ @@ -422,7 +423,7 @@ class UsersController extends Controller { } } $oldEmailAddress = $user->getEMailAddress(); - $oldEmailAddress = is_null($oldEmailAddress) ? '' : $oldEmailAddress; + $oldEmailAddress = is_null($oldEmailAddress) ? '' : strtolower($oldEmailAddress); if (isset($data[AccountManager::PROPERTY_EMAIL]['value']) && $oldEmailAddress !== $data[AccountManager::PROPERTY_EMAIL]['value'] ) { |