aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-31 14:08:24 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-07-02 14:27:22 +0200
commitae7eca8a36f930f2c332525e55344c6382aeb2fe (patch)
tree4f3764837e89c20e3fb5c82cdee3b9bb03b7274c
parent6865d518697b59dffe6b1c825f5a082fa9852974 (diff)
downloadnextcloud-server-ae7eca8a36f930f2c332525e55344c6382aeb2fe.tar.gz
nextcloud-server-ae7eca8a36f930f2c332525e55344c6382aeb2fe.zip
Fix TypeError when "email" is not given in the controller request
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--apps/settings/lib/Controller/UsersController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index 115a94a69df..f5470edd72e 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -380,7 +380,7 @@ class UsersController extends Controller {
);
}
- $email = strtolower($email);
+ $email = !is_null($email) ? strtolower($email) : $email;
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
return new DataResponse(
[