mardi 21 août 2018

Laravel Password reset not working

I have a situation where the lavavel password authentication doesnt seem to pick up a password reset. New passwords for new users work Im stuck on creating a reset.

 $email = $request['email'];
  //$pwmail = (string)str_random(10);
  $pwmail = (random_str(4));
  //$pwmail = '1234';
  $password = \Hash::make($pwmail);

  $userscon2 = \DB::table('users')->where('email',$email )->update(['password' => $password]);

I have printed the hashes out and compared them with whats in the database and they match. Part of my login Controller below

 if (Auth::attempt(['email' => $request['email'], 'password' => $request['password']])) {
       return redirect()->route('dashboard');
    } else {
    return redirect()->back();
    }

I have also happened to give bcrypt a try as well.



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

Aucun commentaire:

Enregistrer un commentaire