Jason,
I created a simpler rule and it still isn't doing what I need so I am missing something.
I have rule "Email Verified".
$comparisons[0] = array(TRUE, "".((isset($_SESSION['UserEmailVerified']))?$_SESSION['UserEmailVerified']:"") ."", 1, "1");
That's all it has in it.
What my intentions are that this rule looks at the logged in user's session for UserEmailVerified and checks to see if it's 0 or 1. If it's = 1 then they are verified.
So here's how I used it so far.
On the user_Profile.php page. I want them to see this page if they are logged in. But I also want them to see the message that their email is not verified if their session for email = 0.
So I wrapped it like this.
Under the show region, if I select "not email verified", I get this.
<?php if(!WA_Auth_RulePasses("Email Verified")){ // Begin Show Region ?>
<form name="form1" method="post" action="">
Your email address has not been verified.
<input type="submit" name="verify_button" id="verify_button" value="verify">
</form>
<?php } // End Show Region ?>
And on a "protected" page, I don't want them to have access to this page even if they are logged in, UNLESS their email is verified. So the access rule is this.
If under the page access I select "email verified" I get this.
<?php if (!isset($_SESSION)) {
session_start();
}
if (!WA_Auth_RulePasses("Email Verified")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
Both are using the same argument aren't they? Accept one is the opposite of the other. They both have the "!" in there but the first is using Allow if and the second is using restrict if? Is that right? (here's where I get confused with all the double negatives).
The first example is a show region so if they are not verified, then I DO want them to have access to that line of text.
The second is a page access so that would say if this rule passes, grant access to this page, otherwise redirect them to the login page.
Or do I have this confused?
Thanks,
TroyD
(*I was working on this post as your previous came in. I will follow that one and submit my page. Might be later however.)