Check If Super Admin

473 Views

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

else:

  // Not super so kick them out!

endif;

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

Add New User to Joomla 2.5.+ and Joomla 3+ from external file

657 Views

Adding new user to Joomla from external file has been one of my popular tutorial but it was not complete since I did not provide the entire codes for the external file. In this tutorial, I will include the entire snippet to add a new user to Joomla. The code includes two sets of includes, one for Joomla 3.0+ and another for lesser version.

Welcome to Western Studios

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