confide icon indicating copy to clipboard operation
confide copied to clipboard

Solves password reset bug

Open gabrielalmeida opened this issue 10 years ago • 3 comments

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:

gabrielalmeida avatar Mar 08 '15 05:03 gabrielalmeida

@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.

megadola avatar Jul 06 '15 07:07 megadola

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.

gabrielalmeida avatar Aug 13 '15 04:08 gabrielalmeida

Coverage Status

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

coveralls avatar May 12 '17 10:05 coveralls