I'm writing a Joomla 3.x component and I search now the possibility to get from a user (which is assigned to multiple user groups) the 'ID' from the user group with the 'highest level'.
Example: - user is a member from registered and manager and some other groups.
I can get in a first step the ID from 'all' assigned user groups:
jimport( 'joomla.access.access' ); $groups = JAccess::getGroupsByUser($user->id);
But how can i get now the 'id' from the user group with the 'highest' level? I can not found a method for this in the core files.
Edit: I have in my component added a backend part where it is possible to define many special settings for every user group. But i have not an idea how i can get then in the frontend the correct settings, when a user is a member in multiple groups. I need in this case not any 'permissions' from the Joomla assets table. Only the 'ID' from the 'most important' group. It is useful to check then the 'parent' ID from every group? Or use getGroupPath($groupId)?