From Whirlwind eCommerce Wiki
Jump to: navigation, search


eV::authorizeIsLoggedOut($redirectOnFalse) checks if a user is currently logged out.


$bool = authorizeIsLoggedOut([$redirectOnFalse]);


  • $redirectOnFalse STRING OPTIONAL
URL to forward visitor to, if logged out check fails.

Return Values

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.


Example using redirect (forwarding)
// 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');
Example without using redirect
// just checking log in status in order to show different content
$isLoggedOut = eV::authorizeIsLoggedOut();
// logged in
echo "You are logged in";
} else {
// not logged in
echo "YOu are not logged in";