user->isLoggedIn (method)

Return to Knowledgebase

Purpose

Checks if a user is logged in

Location

users/classes/User.php

Parameters

This function does not take any arguments

Example

if(isset($user) && $user->isLoggedIn()){//do something }

Further Documentation:

This method is generally used with isset($user) to avoid throwing errors. The typical usage is