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
e30271be4f
commit
3304d33e3b
|
@ -344,7 +344,7 @@ class UsersController extends Controller {
|
||||||
$twitter,
|
$twitter,
|
||||||
$twitterScope
|
$twitterScope
|
||||||
) {
|
) {
|
||||||
$email = strtolower($email);
|
$email = !is_null($email) ? strtolower($email) : $email;
|
||||||
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
|
if (!empty($email) && !$this->mailer->validateMailAddress($email)) {
|
||||||
return new DataResponse(
|
return new DataResponse(
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue