force user to change password
Archived from the Xataface Users forum.
samhans — Tue Apr 03, 2012 8:03 am
hai Steve and all friends ;
can anybody suggest me how could i force a user to change passwords while logging in my application.
thanks in advance.
shannah — Tue Apr 03, 2012 9:26 am
You could add a flag somewhere (e.g. the users table), to track whether this use has to change his password. Then you could add some logic to the beforeHandleRequest() method of your application delegate class to check if this flag is set, and change the $query[‘-action’] parameter to ‘change_password’ if it is set.
Then you would also need to add something to the beforeSave() handler to check if the value has been changed on the password field, and to unset the ‘change password’ flag so that you don’t keep on forcing him to change his password.
-Steve
samhans — Thu Apr 05, 2012 12:12 am
thanks steve for the reply i am doing the business, come back soon