[eluser]The Revel[/eluser]
I want to have a list that only lists admins but I cannot figure out where in the following code to limit it by group. In my old programming I always used access levels (number based) which allowed granting rights based on the number
i.e.
Code:
if ($access_lvl => 8)
{
//Do this
}
The access level was listed as a column in the user table. ion_auth uses Groups and these are stored in a different table. So getting a list of users on a certain access level (group) isn't as easy. The code I am looking to modify is the code in the Index in the original which I have now names as view_admins() and the listing of the users (all of them, despite group) is as follows:
Code:
//list the users
$this->data['users'] = $this->ion_auth->users()->result();
foreach ($this->data['users'] as $k => $user)
{
$this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();
}
Now how do I pull a list of only a single group?