that is just the results of a query from the user table that returns some fields regarding user status, device type etc..
even without my custom code, messages are not displayed if userLoggingIn() returns FALSE
the failure messages/code are getting triggered, but not displaying.
I use PHPed and am able to step through the code in the IDE and can see the results realtime, everything is triggering as should be but the messages are not displayed.
I've taken all my code out and have changed the code to this:
// User Logging In event
public function userLoggingIn($usr, &$pwd)
{
$this->setFailureMessage("Something Went Wrong at userLoggingIn");
return false;
}
if you return FALSE in the above, the message will not be displayed...
if you return TRUE in the above, the message will be displayed...
i think because these are php queued messages they won't display until a page is refreshed...
when you return FALSE from userLoggingIn() the page is not being refreshed, thus the messages will not appear, when true is returned.. the run() continues and completes the login success which then refreshes or changes the landing page and the messages are then displayed.
even the message in function run(), if false is returned from userLoggingIn() the "LoginCancelled" message doesn't get triggered
In run()
condensed code...
if ($validate) {
// Call Logging In event
$validate = $this->userLoggingIn($this->Username->CurrentValue, $this->Password->CurrentValue);
if ($validate) {
LOGIN SUCCESSFUL...
} else {
if ($this->getFailureMessage() == "") {
$this->setFailureMessage($Language->phrase("LoginCancelled")); // Login cancelled <<<<<<<<<<<====== this should display if FALSE returned from userLoggingIn()
}
}
the else message does not get displayed as well