Joomla Check If Super Admin

887 Views

In this tutorial, we will check that the logged in user has super admin rights, this work in Joomla 3 and above.

// Get the user object
$user       = JFactory::getUser();

// Get the user authorization for admin level
$isadmin = $user->authorise('core.admin');

if($isadmin === true){
  // User is super admin
}else{
  // User is NOT super admin.
}

A simple but very useful tutorial. Leave a comment 🙂

Please Post Your Comments & Reviews

Welcome to Western Studios

We provide professional website and mobile softwares including Joomla, Wordpress and more.