Fix TypeError when "email" is not given in the controller request

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2021-01-31 14:08:24 +01:00
parent a7431817b9
commit ac0c18327e
1 changed files with 1 additions and 1 deletions

View File

@ -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(
[