WP-Members: Membership Framework
[resolved] [closed] Password Change After Password RESET (3 posts)

  1. Copernicus
    Posted 2 years ago #


    The solution on http://wordpress.org/support/topic/plugin-wp-members-first-time-login-redirect-to-password-change is excellent for forcing a password change upon first login; but we want to also force a password change after a user has used the "Reset password" feature.

    The reason being that WP-Members sends passwords to users via email. Since this isn't very secure, we want to ensure that users are always changing their password after they receive a password via email.

    Is there a modification to the code on http://wordpress.org/support/topic/plugin-wp-members-first-time-login-redirect-to-password-change that will force password changes on both instances (first login & password reset)?


  2. Chad Butler
    Plugin Author

    Posted 2 years ago #

    There is a filter hook in email process that would indicate that the user has successfully reset their password, since if the process reaches the point of that filter, the user's password has been reset and they are being sent an email with the new password.

    The filter hook wpmem_email_repass is really for filtering the email message, but you could at that point set some kind of a flag for the user. But that is the tricky part - unlike the other example, you don't readily have the user data available to set some kind of flag tied out to the user. And all you have passed to the filter is the email content. You might be able to grab the user's email address at that point from the form submission ( $_POST['user_email'] ? ) and then use that to get_user_by('email') to get the user's ID.

  3. sh@nnon
    Posted 2 years ago #

    I'm also trying to redirect after password reset; Chad, could you write up a snippet of how the email filter can be used in the redirect like you did in the 'Password Change After First Login' post? I've had no luck so far. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic