I’m pretty new to this framework (just been a couple days). I am trying to create a user login and management for my website. Ofcourse it would require a view to update the user details later, and the admin should have rights to edit details of all users. I have all the users (including admins) in a Users Table.
The problem is that the view display all the fields in the Table including the password field. Now if the Admin wants to change the email ID of a user A, the view is displaying the password too from the database (which, as far as i know is a hashed or MD5 of the actual password). I could comment it out so the password isn’t displayed.
But the real problem is that when the Admin updates the details using the view, the hashed value of the password is again getting hashed, which literally changes the password to something else.
I have tried searching the forums for a solution, but I’m not sure what exact things I’ll need to avoid this. Pleas help.
Depending on what you need there are different solutions…
If you need just a form for changing the user details… you can just remove the password input field from the view…
If you need a form to update the user details that will update the details only when the users enters his current password… you can save the current md5 hash and unset the password attribute before rendering the view…