Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\Illuminate\Foundation\Auth\ResetPasswords #11012

Closed
esperantic opened this issue Nov 18, 2015 · 3 comments
Closed

\Illuminate\Foundation\Auth\ResetPasswords #11012

esperantic opened this issue Nov 18, 2015 · 3 comments

Comments

@esperantic
Copy link

if use ResetsPasswords trait in PasswordController,

function resetPassword update $user->password = bcrypt($password); (line 113) with double encrypt...
I was long time search why user can't login after restore password but problem was in this function.
because, if update password field in user object, Eloquent automatically encrypt password.
problem solved if change $user->password = bcrypt($password); to $user->password = $password;

@joaumg
Copy link

joaumg commented Nov 19, 2015

Store passwords as plain text is a really, really bad idea.

Are you sure you have OpenSSL PHP Extension installed ?

@rkgrep
Copy link

rkgrep commented Nov 19, 2015

You're probably encoding password somewhere before it is passed to the trait.

@arcanedev-maroc
Copy link
Contributor

Hi @driesvints, is there any workaround to override only this line instead of overriding the whole method?

The issue i've got is when i use the default reset password controller + a mutator setPasswordAttribute in the user model = hashes the password twice.

I can make a PR to extract a method like $this->setUserPassword($user, $password) in Illuminate/Foundation/Auth/ResetsPasswords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants