summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-10-27 14:56:52 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-10-27 20:25:30 +0000
commitfdc70c08c6b37cccfe1e69c6228ddee1c374c6e5 (patch)
tree19f65b748c094d9671fd080fab2975e75143c734 /apps
parentfe8e238df2a9cecf31e0f8354a04186fd1a6cba9 (diff)
downloadnextcloud-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.php3
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']
) {