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

AdminController.php requires to retype user password to change other fields #303

Open
kitsunekyo opened this issue Dec 6, 2016 · 0 comments

Comments

@kitsunekyo
Copy link
Contributor

kitsunekyo commented Dec 6, 2016

the controller will load password as DataEdit->password field which is empty. When sending the update to the database it will also send the empty password in the update.

Instead it should check if the password field is empty, in that case drop the password part from the update database query.

Removing the ->rule('required') part will prompt a database error as it still doesnt drop the password from the sql query:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'password' cannot be null (SQL: update `admins` set `password` = , `updated_at` = 2016-12-06 13:50:37 where `id` = 5)`

I dont know yet how to modify the controller in that regard. so i need help with a few things:

  • how do I influence what gets sent as sql query from the controller?
  • how would i make the password field read the existing value
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

1 participant