Page 1 of 1

force user to change password

PostPosted: Tue Apr 03, 2012 8:03 am
by samhans
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.

Re: force user to change password

PostPosted: Tue Apr 03, 2012 9:26 am
by shannah
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

Re: force user to change password

PostPosted: Thu Apr 05, 2012 12:12 am
by samhans
thanks steve for the reply i am doing the business, come back soon