Check If Super Admin


While developing my subscription software for Joomla, I found it very difficult to find a solution for determining the super admin. It turns out it was actually a simple solution and this tutorial will show you how to do that.

$user = JFactory::getUser();//first get the logged in user

if($user->get('usertype') =='Super Administrator')://Now check their user type

   // This user is super admin


  // Not super so kick them out!


That’s it. Now you should be able to get your user admin level. Consider leaving a comment.

Please Post Your Comments & Reviews

Welcome to Western Studios

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