Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.0k views
in Q2A Core by
edited by

I'm using the code shown below in qa-app-users.php  ( the $qa_logged_in_userid_checked=true; function)

..which makes the site private..  but this means users can't get to the forgot password page when they are not logged in..   

how do i create an exception to the redirect for  www.someQ2Asite.com/forgot   ... ? 

thanks much ! 

if (

    (empty($_SESSION['qa_session_userid_'.$suffix]))

    && ($_REQUEST["qa-rewrite"]!="login")

    && ($_REQUEST["qa-rewrite"]!="register")){

              qa_redirect_raw('login');

 }

Q2A version: 1.6

2 Answers

0 votes
by
Look at https://github.com/JackSiro/Q2A-Closed-Site-Plugin. For me (V1.7) this plugin works for this purpose. In qa-closed-layer.php you can exclude the »forgot«page.
...