From: Daniel Calviño Sánchez Date: Sun, 31 Jan 2021 13:08:24 +0000 (+0100) Subject: Fix TypeError when "email" is not given in the controller request X-Git-Tag: v20.0.10RC1~3^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ddd89273663ff2449793f6091d4d0dfbdf9a082;p=nextcloud-server.git Fix TypeError when "email" is not given in the controller request Signed-off-by: Daniel Calviño Sánchez --- diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index f7e5c35cb1a..4dfc6e0d71e 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -361,7 +361,7 @@ class UsersController extends Controller { $twitter, $twitterScope ) { - $email = strtolower($email); + $email = !is_null($email) ? strtolower($email) : $email; if (!empty($email) && !$this->mailer->validateMailAddress($email)) { return new DataResponse( [