UserList from list of user ids

Permalink
Hi,
I really need to get a UserList from list of users ids (array of integer).
Thanks a lot for helping me, Sylvain.

chawilaclef
 
shahroq replied on at Permalink Reply
shahroq
$userList = new UserList();
$userList->filter(false, 'u.uID IN (1, 2)'); //by cIDs
$users = $userList->getResults();
foreach ((array)$users as $user) {
    echo $user->getUserID().'-'.$user->getUserName().'<br/>';
}

You can check this cheat sheet for more filter options:
https://github.com/shahroq/whale_c5_cheat_sheet#Filter-a-user-list...