Hi,
appears phpMaker has made changes to fix the userLoggingIn() issue, but now, userLoggingIn() and userCustomValidate, does not support $this->setFailureMessage().
anyone have a workaround to display messages easily enough?
Hi,
appears phpMaker has made changes to fix the userLoggingIn() issue, but now, userLoggingIn() and userCustomValidate, does not support $this->setFailureMessage().
anyone have a workaround to display messages easily enough?
You may use:
FlashBag()->set("failure", $msg);
thanks, this worked.
is there any way to force/append the new message to display? – the message doesn’t display unless the page is refreshed, the message it displays “login cancelled” is displayed after returning from the function set as false.
example
public function userLoggingIn(string $userName, string $password): bool
{
if (!in_array($iso, $UserAllowedCountry)) {
SendEmail_Security_Login_Alert($userName, "$iso", "$cn", "$region", "$city");
WriteAuditLog($userName, $Language->phrase("AuditTrailLogin"), "$guest_ip", "$iso", "$cn", "", "DENY");
FlashBag()->set("failure", str_replace("%s", $cn, $Language->phrase("UnAuthorizedCountry")));
return false;
}
}
the above failure message is not displayed unless the page is refreshed, the “login cancelled” is displayed when returning from this function.
tried FlashBag()->add() – same outcome
thanks,
JS