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

Save user controller returning current password error with incorrect key? #4169

Closed
samhibberd opened this issue Apr 23, 2019 · 2 comments
Closed

Comments

@samhibberd
Copy link

Description

The save user controller requires the current password to update email, username or password. It correctly returns the error if currentPassword is not set or incorrect, although it requires an input called password is sent to the controller, but returns and error with the key currentPassword. Not sure if / why this is, as for us it's causing some complication when adding errors to forms using javascript.

Should it not be named the same password?

Steps to reproduce

  1. Create a front end template profile form template, posting using ajax when requesting a password change but send invalid current password.
  2. Check response.

Additional info

  • Craft version: 3.1.23
  • PHP version: 7.1.25
  • Database driver & version: MySQL 5.5.5
@samhibberd samhibberd changed the title Save user returns currentPassword error key Save user returns current password error with currentPassword key rather than password Apr 23, 2019
@samhibberd samhibberd changed the title Save user returns current password error with currentPassword key rather than password Save user returns current password error with currentPassword key rather than password Apr 23, 2019
@samhibberd samhibberd changed the title Save user returns current password error with currentPassword key rather than password Save user returning current password error with incorrect key? Apr 23, 2019
@samhibberd samhibberd changed the title Save user returning current password error with incorrect key? Save user controller returning current password error with incorrect key? Apr 23, 2019
@brandonkelly
Copy link
Member

Agree that’s a bit awkward. As of the next release Craft will check for an input named currentPassword in addition to password.

@samhibberd
Copy link
Author

Perfect! Thanks @brandonkelly

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

2 participants