Merge pull request #23734 from nextcloud/backport/23720/stable19
[stable19] save email as lower case
This commit is contained in:
commit
4d20a63d4f
|
@ -343,6 +343,7 @@ class UsersController extends Controller {
|
||||||
$twitter,
|
$twitter,
|
||||||
$twitterScope
|
$twitterScope
|
||||||
) {
|
) {
|
||||||
|
$email = strtolower($email);
|
||||||
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
|
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
|
||||||
return new DataResponse(
|
return new DataResponse(
|
||||||
[
|
[
|
||||||
|
@ -422,7 +423,7 @@ class UsersController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oldEmailAddress = $user->getEMailAddress();
|
$oldEmailAddress = $user->getEMailAddress();
|
||||||
$oldEmailAddress = is_null($oldEmailAddress) ? '' : $oldEmailAddress;
|
$oldEmailAddress = is_null($oldEmailAddress) ? '' : strtolower($oldEmailAddress);
|
||||||
if (isset($data[AccountManager::PROPERTY_EMAIL]['value'])
|
if (isset($data[AccountManager::PROPERTY_EMAIL]['value'])
|
||||||
&& $oldEmailAddress !== $data[AccountManager::PROPERTY_EMAIL]['value']
|
&& $oldEmailAddress !== $data[AccountManager::PROPERTY_EMAIL]['value']
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue