Verified Commit 41c22f4a authored by Tim Visée's avatar Tim Visée
Browse files

Do not attempt to get user from possible null email object

See #360
parent 1c3aafd9
Pipeline #202099652 passed with stage
in 5 minutes and 23 seconds
......@@ -33,7 +33,7 @@ class PasswordForgetController extends Controller {
$email = Email::where('email', '=', $request->input('email'))->first();
// Send login link if user has no password
if(($user = $email->user) != null) {
if($email != null && ($user = $email->user) != null) {
if(!$user->hasPassword()) {
// Create and send session link
$link = SessionLink::create($user, route('password.change'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment