VerfiedUser no longer working
Hello,
I had successfully created a double opt in registration system, but then proceeded to start to apply user-level authentication and it appears as if I've broken the check for VerifiedUser somehow.
I've reverted to a previously successful login.php page, so I'm wondering if there is some support file I may have inadvertently changed.
Here are the symptoms:
- User can log in before completing the email verification process -- at least a successful login message is display on the login page which is shown on WA_Auth_RulePasses("Log in success")
- After successfully completing email verification and logging in, user cannot access pages that are set to require VerifiedUser through SecurityAssist Access Pages Manager. Database successfully update to emailVerified=1 but access is denied.
- As an additional test, I created a show region on the login page that would display if WA_Auth_RulePasses("VerifiedUser"). That area is not shown after a verified user logs in (login page reloads to login.php?loggedIn=1 on successful login.)
Like I said, I've examined the code on the login page and rolled back to a known working version, so I wonder if there is some helper file I should check, but I'm not sure where or what to look for.
This seems to be the relevant portion of the login page for your review. Any advice would be greatly appreciated.
---------------------
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => [xxxxxxx],
"database" => [xxxxxx],
"tableName" => "[xxxxxx]",
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."".$WA_Auth_Separator."".(WA_CryptEncryption((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"")) .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."emailVerified"),
"sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID".$WA_Auth_Separator."emailVerified"),
"successRedirect" => "login.php?loggedIn=1",
"failRedirect" => "login.php?failedLogin=1",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>
<?php
if((((isset($_SESSION["SecurityAssist_UserID"]) && $_SESSION["SecurityAssist_UserID"] != "")?"LoggedIn":"") == "")&&(((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
$WA_Auth_Parameter = array(
"connection" => [xxxxxx],
"database" => [xxxxxx],
"tableName" => [xxxxxx],
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") ."".$WA_Auth_Separator."".(WA_CryptEncryption((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"")) .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID".$WA_Auth_Separator."emailVerified"),
"sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID".$WA_Auth_Separator."emailVerified"),
"successRedirect" => "index.php",
"failRedirect" => "",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>