User Methods


Introduced in Version 2.0


Is this the Guest user? Returns true or false.

Because this is a boolean (true/false) we can create simple if statements to determine the current user's guest status:

if ($user->isGuest()) {
    // Show some content specifically for guests
} else {
    // Show different content for logged-in users


Post Comment