user->exists (method)

Return to Knowledgebase

Purpose

Checks if a user is logged in and the user class is instantiated

Location

users/classes/User.php

See Also:

user->isLoggedIn (method)

Parameters

This function does not take any arguments

Example

if($user->exists()){//do something }

Further Documentation:

This method is not used in UserSpice and the isLoggedIn method is preferable. However, if a user is logged in and the user class is instantiated would return true. Otherwise, it would return false.