Skip to content

Solves password reset bug#516

Open
gabrielalmeida wants to merge 1 commit intoZizaco:masterfrom
gabrielalmeida:master
Open

Solves password reset bug#516
gabrielalmeida wants to merge 1 commit intoZizaco:masterfrom
gabrielalmeida:master

Conversation

@gabrielalmeida
Copy link
Contributor

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.

🍻

@gabrielalmeida gabrielalmeida changed the title Solve password reset bug Solves password reset bug Mar 8, 2015
@megadola
Copy link

megadola commented Jul 6, 2015

@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
Copy link
Contributor Author

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.

One cannot set new password because Confide expects all mandatory form
fields from an update to be sent, as a password change this only
sends password and password_confirmation.
@coveralls
Copy link

Coverage Status

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

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

Successfully merging this pull request may close these issues.

3 participants