mardi 18 juillet 2017

Auth::attempt() always return true in laravel 5.1

I am wondering why my condition is not working. If I remove the password_reset then it work, but when I include, it won't work again. Please see my code below:

$requirements = [
    'username' => $request->input('username'),
    'password' => $request->input('password'),
    'deleted' => 0,
    'status' => 1,
    'confirmed' => 1,
    'password_reset' => 0
];


    if(Auth::attempt($requirements)){
        dd('success');
    } else{
        return redirect()->back()->with('danger', 'Oops! Login Failed.');
    }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uDkvdD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire