title: How to Get User Group Names in Joomla 2.5
body: <p>I'm writing a Joomla 2.5 component that I had been developing in Joomla 1.7. I have been using code like this:</p>
  
  <pre><code>$user = JFactory::getUser();
  $groups = $user-&gt;get('groups');
  </code></pre>
  
  <p>The $groups array would contain a list of ids with the group name as the index. Joomla 2.5 seems to have scrapped this functionality. I have been unable to find out how to get the group names without directly querying the database. Is there any method for getting a list of the groups a user is a member of without having to resort to querying the database?</p>