Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When a user resets their password via the link in the password reset email, I know I can use the password_reset hook to get the user object and the new password. I want to validate the new password to ensure that the strength requirements are met, but I'm not sure on how to generate the error messages so that they display above the form.

When I did this on the profile page via the user_profile_update_errors hook, I had a WP_Error I could add to, but not with this hook.

What would be the best way to handle this?

share|improve this question
add comment

1 Answer 1

I'm not 100% sure If I understood your question. but heres the plugin http://wordpress.org/extend/plugins/force-strong-passwords/ that forces user to input strong password.

share|improve this answer
    
The plugin you mentioned only enforces this on the profile page, not the password reset page. –  NightHawk Sep 17 '12 at 15:42
    
Have you checked the plugin file on github ? github.com/gyrus/Force-Strong-Passwords/blob/master/… read from line 120 –  Kuldeep Daftary Sep 17 '12 at 15:54
    
The thing is, I found a way to enforce the requirements server-side, I just don't know enough about WordPress and how to use WP_Error to display corresponding errors on the page. –  NightHawk Sep 17 '12 at 16:17
    
Can you share the code you have written so far? –  Kuldeep Daftary Sep 17 '12 at 18:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.