User Methods


Introduced in Version 2.0


Is this the Superuser? Returns true or false.

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

if ($user->isSuperuser()) {
    // Show some content specifically for superusers - perhaps a link to the ProcessWire admin page
} else {
    // Show different content for all other users


Post Comment