Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Security API > Methods

Security API: isGuest

Scroll Prev Next More

 

Returns true if the user is logged in as Guest, returns false otherwise.

Syntax

Security.isGuest()

Arguments

No arguments.

Return value

Returns true if the user logged in as Guest, returns false otherwise.

Example

This example shows how to check if the current user is a guest.

 

 

if (Security.isGuest()) {
  MVCFunctions.print_r("I'm a guest");
}

 

See also:

Advanced security settings: Login as Guest

Security API: isAdmin

Security API: isLoggedIn

About Security API