Making an Admin LogOut page
If you want a user logout page for the admin area you can use the same page as you are for the users but you will need to modify some of the things at the top. Currently lines 1-6 look like this in the logout page:
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to users")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
If you made a copy of this page and put it in the admin area you would need to change these lines to be like this instead:
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Administrator")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
You would also need to make a link to this page in your admin area.
I duplicated the users_LogOut.php and put it in the Admin directory. I changed the code as you discribed above and put a logout link on one of the admin pages. But when selecting the logout, I'm taken to the Admin LogIn and the "You are logged in. You may proceed..." text is still showing and I'm not logged out?
Here is code from my admin LogOut page:
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Administrator")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
So what did I do wrong?