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:
parent
0dfd0ec77a
commit
0ddd892736
|
@ -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(
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue