I have a problem which I can't solve. What I need is list all activated Joomla users. I found and modifed this code:
jimport( 'joomla.access.access' );
$coaches = JAccess::getUsersByGroup(2);
jimport( 'joomla.user.user' );
foreach($coaches as $coaches){
$coach[$coaches] =& JFactory::getUser($coaches);
}
asort($coach);
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?).
with kind regards W.
Here you go, check comments to understand: