Please enable JavaScript to view this site.

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

Security API: sLoggedIn

Scroll Prev Next More

 

Returns true if user is logged in and not a guest, returns false otherwise.

Syntax

Security.isLoggedIn()

Arguments

No arguments.

Return value

Returns true if user is logged in and not a guest, returns false otherwise.

Example

This example shows how to check if the current user is logged in.

 

 

if (Security.isLoggedIn()) {
  MVCFunctions.print_r("I'm logged in");
}

 

See also:

Security API: isGuest

Security API: isAdmin

User group permissions

About Security API