How to get user aid in Joomla 1.6
In Joomla 1.5 we got users aid or user access identifier by calling get() method on user object.
$user =& JFactory::getUser();
$aid = $user->get('aid', 0);
In Joomla 1.6 advance ACL was introduced instead of get('aid') we can use getAuthorisedViewLevels() method that returns the array with user access view levels. Then we can use PHP native max() method to get the highest access identifier.
$user =& JFactory::getUser();
$aid = max ($user->getAuthorisedViewLevels());
Related Articles
| < Prev | Next > |
|---|