SA wont allow logged in user?
Hi, first crack at SA and confused.
My users stored in table have a ContactID, ContactGroupID, Contact name etc etc. These 3 fields are stored when users log in, have tested this by adding to the redirect page after successful login.
I have it set to redirect to 'redirect.php' after login, this contains:
<?php
if(!session_id()) session_start();
switch($_SESSION['SecurityAssist_UserGroupID']) {
case "2":
header("Location: direct_tblcontacts_Results.php");
break;
case "4":
header("Location: staff_tblcontacts_Results.php");
break;
case "5":
header("Location: admin_tblcontacts_Results.php");
break;
}
?>
So far so good, but I then used SA Access Pages Manager, chose test.php and set as:
<?php
if (!WA_Auth_RulePasses("Log in success")){
WA_Auth_RestrictAccess("login.php");
}
?>
I thought this would allow logged in user to see test.php but it just redirects user to login.php?
What I need to do is allow users with ContactGroupID=4 to access this page & restrict table records to ContactID, anyone in other group would be redirected to login.php?
Any ideas?
Thanks