WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Copernicus
    Member
    Posted 5 months ago #

    Hello,

    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)?

    https://wordpress.org/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 5 months 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
    Member
    Posted 2 months 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

About this Topic