Sure, so if you setup your call like this:
$user_list = $this->userauth->getData();
what you end up with an 3d array of users and their information
Array (
[0] => Array (
[id] => 1
[username] => user1
[password] => 55c3b5386c486feb662a0785f340938f518d547f
[name] => name 1
[email] => email1@address.com
[ip] => 255.255.255.255
[status] => 3
)
[1] => Array (
[id] => 2
[username] => user2
[password] => 55c3b5386c486feb662a0785f340938f518d547f
[name] => name 2
[email] => email2@address.com
[ip] => 255.255.255.255
[status] => 3
)
)
This then gives you the ability to foreach out your array as such
foreach($user_list as $user) {
echo $user['name'] . ' - '.$user_perm_level[$user['status']].'<br />';
}
*** one to keep in mind is that I setup the user perm level as a config item so you’ll basically want to do something like this before your foreach…
$user_perm_level = $this->config->item('user_perm_level');
