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()) {
  echo "I'm a guest";
}

See also:

Advanced security settings: Login as Guest

Security API: isAdmin

Security API: isLoggedIn

About Security API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software