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

Wrong message displayed when passwords mismatch #504

Closed
lfolco opened this issue Jan 26, 2015 · 3 comments
Closed

Wrong message displayed when passwords mismatch #504

lfolco opened this issue Jan 26, 2015 · 3 comments

Comments

@lfolco
Copy link

lfolco commented Jan 26, 2015

In the UserValidator, if the user inputs mismatched passwords, it it returning the error message for wrong confirmation code:

public function validatePassword(ConfideUserInterface $user)
    {
        $hash = App::make('hash');

        if ($user->getOriginal('password') != $user->password) {
            if ($user->password === $user->password_confirmation) {

                // Hashes password and unset password_confirmation field
                $user->password = $hash->make($user->password);
            } else {
                $this->attachErrorMsg(
                    $user,
                    'confide::confide.alerts.wrong_confirmation',
                    'password_confirmation'
                );
                return false;
            }
        }

        unset($user->password_confirmation);

        return true;
    }

Shouldn't it return a message pertaining to the password mismatch?

@Zizaco
Copy link
Owner

Zizaco commented Jan 31, 2015

It seems that you are using an old version of the package, look: https://github.com/Zizaco/confide/blob/master/src/Confide/UserValidator.php#L96

@lfolco
Copy link
Author

lfolco commented Jan 31, 2015

ah! i was on the username optional branch, so that explains it :)

@malhal
Copy link

malhal commented Feb 13, 2015

I had this problem too today and updating fixed it, thanks for the fix.

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

No branches or pull requests

3 participants