title: JAccess::getUsersByGroup, How to check is user activated in joomla and sort it alphabetical by name
body: <p>I have a problem which I can't solve.
  What I need is list all activated Joomla users.
  I found and modifed this code:</p>
  
  <pre><code>    jimport( 'joomla.access.access' );
      $coaches = JAccess::getUsersByGroup(2);
      jimport( 'joomla.user.user' );
      foreach($coaches as $coaches){
          $coach[$coaches] =&amp; JFactory::getUser($coaches);
      }
      asort($coach);
  </code></pre>
  
  <p>But this solution has two bugs which I can't fix:
  - first: this showing unactive (not activated) users too,
  - secound: asort() don't sort users by name (probably it's sort users by login?).</p>
  
  <p>with kind regards W.</p>