Restricted Site Access
[resolved] Allow access to lost password page using TML (2 posts)

  1. rezon8dev
    Posted 2 years ago #

    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.



  2. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 2 years ago #

    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;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Restricted Site Access
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic