$user->groups does not contain group names - Joomla! Forum - community, help and support


in joomla 1.7 had following code check user had enough access view particular feature:

$user = jfactory::getuser();
$hasaccess = array_key_exists("eventpublisher", $user->groups);

in joomla 2.5.6, group id stored in array. these methods yield similar results in 2.5.6:
jaccess::getgroupsbyuser($user->id);
jfactory::getuser()->getauthorisedgroups();

how determine if user belongs "eventpublisher" group now?






Comments