WordPress.org

Support

Support » Plugins and Hacks » Restricted Site Access » [Resolved] Allow access to lost password page using TML

[Resolved] Allow access to lost password page using TML

  • Hi,
    Can you help with the code for my functions.php which will allow a visitor to access the /lost-password page when using the redirect to a specific page option for a registered user protected site? I’m using theme my login and have placed a gravity form for site registration on the TML login page but would ideally like the above code to allow me to add additional pages to the code when I want to allow them to be accessed by a user in addition to my login/register page.

    Thanks!

    http://wordpress.org/extend/plugins/restricted-site-access/

Viewing 1 replies (of 1 total)
  • Plugin Author Jake Goldman

    @jakemgold

    The ‘restricted_site_access_is_restricted’ let’s you override restriction.

    In this case:

    add_filter( 'restricted_site_access_is_restricted', 'my_restricted_check', 10, 2 );
    
    function my_restricted_check( $is_restricted, $wp ) {
    	if ( false === $is_restricted )
    		return false;
    
    	if ( ! empty( $wp->query_vars['pagename'] ) && $wp->query_vars['pagename'] == 'lost-password' )
    		return false;
    
    	return true;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Allow access to lost password page using TML’ is closed to new replies.
Skip to toolbar