]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix TypeError when "email" is not given in the controller request
authorDaniel Calviño Sánchez <danxuliu@gmail.com>
Sun, 31 Jan 2021 13:08:24 +0000 (14:08 +0100)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Fri, 23 Apr 2021 14:53:57 +0000 (16:53 +0200)
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
apps/settings/lib/Controller/UsersController.php

index f7e5c35cb1a1409ad2b2dac2ff750779a39968ff..4dfc6e0d71e88a78203a503e10d71808e5e4c161 100644 (file)
@@ -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(
                                [