Zizaco / confide

Confide is a authentication solution for Laravel 4
1.19k stars 258 forks source link

Solves password reset bug #516

Open gabrielalmeida opened 9 years ago

gabrielalmeida commented 9 years ago

Relates to #482

Password reset is validated by the same ruleset that any regular update is. It's going to fail everytime because instead of sending the required fields for update ruleset validation, it's only sending password and password_confirmation.

This PR adds a method on ConfideUser that provides a boolean to be checked at save method and change the ruleset to 'password_reset' which requires only password and password_confirmation to pass on.

Due to the boolean variable that needs to get passed on passwordReset UserRepository and UserController suffered minor changes.

This PR also allows all accordingly validation messages to be sent to final user instead of only showing him/her a generic Confide Lang defined error message.

Dunno if this will break any tests, take it as a proposal template if so.

:beers:

megadola commented 9 years ago

@gabrielalmeida thanks for your support, and sorry about the delay .... normally i can register and activate my account, then i'm trying to reset the password .... after getting an email contain that link to update my password ... and after entering the new password twice and submit ! i'm getting "validation.required" message .....

please let me know if you need me to share some files, codes ?

thanks again, appreciate it.

gabrielalmeida commented 9 years ago

Hi @megadola, apologize for the long delay.

I couldn't reproduce your error message but the PR was broken and I've just updated it. If you still need to get it working, take a look now.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.5%) to 97.789% when pulling 674ac5a8db2f620888413b8905e3f1229911bd25 on gabrielalmeida:master into a5ba244073754ab9452c841e659e2bfe7abf3288 on Zizaco:master.