Jason, what I'd like to do is:
- If user submits form, check userdata, if username is wrong, show error message
- If user submits form, check userdata, if username does not exist, show error message
- If user submits form, check userdata, if username is not active, show error message
- If user submits form, check userdata, if password is wrong, show password error message
But the error messages show up even if the form has not been submitted. It looks like the access rules are not beeing fired.
Maybe my rules are wrong?
Rule:
---
case "UserDataNotCorrect":
$comparisons[0] = array(FALSE, "".((isset($_POST["Email_Address"]))?$_POST["Email_Address"]:"") ."", 2, "".(ValidatedField("index","Email_Address")) ."");
$comparisons[1] = array(FALSE, "".((isset($_POST["Password"]))?$_POST["Password"]:"") ."", 2, "".(ValidatedField("index","Password")) ."");
break;
---
ShowIF
---
<?php if(WA_Auth_RulePasses("UserDataNotCorrect")){ // Begin Show Region ?>
<span class="ERROR">Die eingegebenen Zugangsdaten sind nicht korrekt.</span>
<?php } // End Show Region ?>
---