Contents |
eV::authorizeIsLoggedOut($redirectOnFalse) checks if a user is currently logged out.
$bool = authorizeIsLoggedOut([$redirectOnFalse]);
Returns boolean TRUE/FALSE IF $redirectOnFalse is empty or not passed. TRUE if user is not logged into an account; FALSE if use is logged into an account.
// typically placed in the pre-process area of the template // forward to home page with a message // if anyone attempts to access a page using this template while being logged in eV::authorizeIsLoggedOut('index.php?message=You must be logged out to view this page');
// just checking log in status in order to show different content $isLoggedOut = eV::authorizeIsLoggedOut(); if(!$isLoggedOut){ // logged in echo "You are logged in"; } else { // not logged in echo "YOu are not logged in"; };