I have a "change password" page.
Is there a way to redirect that page when the user login first time using wordpress generated password?
Thanks
|
I have a "change password" page. Is there a way to redirect that page when the user Thanks |
||||
|
|
|
Maybe this helps you? http://stackoverflow.com/questions/4267285/redirect-user-after-first-login-in-wordpress He seems to had a similar problem and solved it a year ago. What he does different to your approach is redirecting 48hrs after registration. Maybe this is enough? If not - I'm looking to do it your way. --- EDIT Okay I just made a plugin what does exactly what you want:
It adds a user meta data "changed_password" to the user who changed its passwort. When logging in it checks whether the user meta data "changed_password" is set and redirects if it is not set (and therefore the user has not changed its passwort even once). When the users password is reset to a random one, the user meta data "changed_password" is reset as well. |
|||||||||||
|
|
Hook user_register and add user metadata to store a "has not logged in yet" flag. Hook wp_login and check for that metadata, delete and redirect if it exists, otherwise do normal login behavior. |
|||
|
|