• Resolved svacontact

    (@svacontact)


    Hi,
    Great plugin. I would like to remove the link to retrieve the username from the password-reset page. I still want to allow password resets, but not username lookups from email addresses. I have poked around the code a bit, but this seems like something that could easily get messed up or cause unintended consequences. I’m probably overlooking something simple. Can you please help with this? Thanks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter svacontact

    (@svacontact)

    Found a solution to this although I’m sure there is a more elegant way. Inserted this PHP code to override the username lookup link:

    add_filter( ‘wpmem_username_link_str’, ‘my_username_link_str’, 10, 2 );
    function my_username_link_str( $str, $link ) {
    return “<font color=red>Please use the Contact Form if you have forgotten your Username</font>”;
    }

    This still left the possibility of direct URL access, so I handled that with an htaccess rule. Based on another support post, I also blocked direct access to the password change URL with htaccess.

    BTW, the reason I asked about this is that I was getting quite a few really annoying password reset attempts from non-members. I’m hopeful that forcing the use of a Contact Form to retrieve the username will curtail a lot of this.

    Plugin Author Chad Butler

    (@cbutlerjr)

    I hadn’t really worked in the possibility of removing the forgot username link, so it’s a new thought (but a good one – like everything else in the plugin, there should be at least one way to change it).

    I’ve noted this in the development list for the 3.2 release to review.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove “Forgot Username” Link’ is closed to new replies.