How can I update a user’s password? ????
we will start from logging in that user:
login screenshot
after that user is logged in of course it will redirected us to user’s dashboard or what:
user dashboard screenshot
let’s say the user wants to update their password?
THAT’S THE PROBLEM HO-HO-HO-HO-HO-HO!
update account details screenshot
HOW CAN WE UPDATE THAT USER’S PASSWORD BASED ON THEIR SESSION?
I don’t know if this logic is right ????
-
since the user is already logged in, once they clicked that edit button… the form from the third screenshot will be shown but “it’s not empty” or “it should not be empty aside from the passwords”. meaning, the Account ID and the Username must have an input coming from the current logged in user.
NOTE: the Account ID is disabled by default to prevent the user from editing it. -
we will update that user’s password base on the User ID that had been passed from a current logged in user. BUT HOW? WHEN WE CAN’T EVEN PASS THE USER ID OF THE CURRENT LOGGED IN USER? ????, EVEN THE USERNAME HO-HO-HO-HO-HO-HO-HO!
Csprdgst is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.