• asrme

    (@asrme)


    Hello,
    When i click on password reset link, it redirects to wordpress default password reset page. I want custom password reset page. What to do?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author xootix

    (@xootix)

    Hello @asrme

    Does this happen after you have successfully reset your password or when you click on “Forgot password” link. Please share your website page link.

    Thread Starter asrme

    (@asrme)

    When I click on forgot password, a link to reset password is sent to my email address. When I click on that link, it takes me to default wordpress forgot password page.

    Plugin Author xootix

    (@xootix)

    Hello,

    If you’re not using woocommerce plugin, it will take you to the wordpress page to reset password.
    Its completely normal.

    Thread Starter asrme

    (@asrme)

    Actually, I want that when I click on link, it should take me to a custom forgot password page. I don’t want users to go to wordpress page.
    Such as in theme my login plugin, if I click on forgot password, it takes me to forgot password page on website and not to wordpress page.
    Is this possible in your plugin?

    Plugin Author xootix

    (@xootix)

    I am not aware of your custom reset password page.

    Here is the default email body filter. Place this in your functions.php
    network_site_url at the end generates reset password link, you need to modify it as per your custom page url.
    This will only work if your page uses the same criteria for resetting password.

    //Filter lost password email
    	add_filter( 'retrieve_password_message', function( $message, $key, $user_login, $user_data ){
    
    		$site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    		$key = get_password_reset_key( $user_data );
    
    		$message = __( 'Someone has requested a password reset for the following account:','easy-login-woocommerce' ) . "\r\n\r\n";
    		/* translators: %s: site name */
    		$message .= sprintf( __( 'Site Name: %s','easy-login-woocommerce' ), $site_name ) . "\r\n\r\n";
    		/* translators: %s: user login */
    		$message .= sprintf( __( 'Username: %s','easy-login-woocommerce' ), $user_login ) . "\r\n\r\n";
    		$message .= __( 'If this was a mistake, just ignore this email and nothing will happen.','easy-login-woocommerce' ) . "\r\n\r\n";
    		$message .= __( 'To reset your password, visit the following address:','easy-login-woocommerce' ) . "\r\n\r\n";
    		$message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">\r\n";
    
    		return $message;
    
    	}, 10, 4 );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘password reset’ is closed to new replies.