// Load the JAccess library jimport('joomla.access.access'); // Get all users in the "Registered" group $users = JAccess::getUsersByGroup(2); // Loop through the list of users and display their usernames foreach ($users as $user) { echo $user->username . 'In this example, the getUsersByGroup method is used to retrieve all users who belong to the "Registered" user group (which has a group ID of 2 in Joomla). The list of users is then looped through and their usernames are displayed on the screen. This code example is likely part of the Joomla core package library, specifically the JAccess library.
'; }