Skip to content

Commit 2758f0e

Browse files
committed
Revert changes on groupModel
1 parent 9e911be commit 2758f0e

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

administrator/components/com_users/src/Model/GroupModel.php

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use Joomla\CMS\Object\CMSObject;
2222
use Joomla\CMS\Plugin\PluginHelper;
2323
use Joomla\CMS\Table\Table;
24-
use Joomla\Database\ParameterType;
2524
use Joomla\String\StringHelper;
2625
use Joomla\Utilities\ArrayHelper;
2726

@@ -345,44 +344,4 @@ protected function generateGroupTitle($parentId, $title)
345344

346345
return $title;
347346
}
348-
349-
/**
350-
* Method to get all users in a group.
351-
*
352-
* @param integer $groupId The id of the group.
353-
*
354-
* @return array Returns an array of users on success, an empty array on failure.
355-
*
356-
* @since __DEPLOY_VERSION__
357-
*/
358-
public function getUsersInGroup($groupId)
359-
{
360-
$db = $this->getDatabase();
361-
362-
// Get the userId's in the group
363-
$db->setQuery(
364-
$db->getQuery(true)
365-
->select($db->quoteName('user_id'))
366-
->from($db->quoteName('#__user_usergroup_map'))
367-
->where($db->quoteName('group_id') . ' = :id')
368-
->bind(':id', $groupId, ParameterType::INTEGER)
369-
);
370-
371-
$group = $db->loadColumn();
372-
373-
if (empty($group)) {
374-
// No users in the group
375-
return [];
376-
}
377-
378-
// Get the users information of the users in the group
379-
$query = $db->getQuery(true)
380-
->select($db->quoteName(['id', 'name', 'username', 'email', 'block', 'sendEmail', 'params']))
381-
->from($db->quoteName('#__users'))
382-
->whereIn($db->quoteName('id'), $group);
383-
384-
$db->setQuery($query);
385-
386-
return $db->loadObjectList();
387-
}
388347
}

0 commit comments

Comments
 (0)