ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilOrgUnitUserQueries.php
Go to the documentation of this file.
1 <?php
9 {
10 
14  protected $dic;
15 
16 
20  public function __construct()
21  {
22  global $DIC;
23  $this->dic = $DIC;
24  }
25 
26 
30  public function findAllUsersByUserIds($user_ids)
31  {
32  $users = array();
33  foreach ($user_ids as $user_id) {
34  $q = "SELECT * FROM usr_data WHERE usr_id = " . $this->dic->database()->quote($user_id, "integer");
35  $usr_set = $this->dic->database()->query($q);
36  $users[] = $this->dic->database()->fetchAssoc($usr_set);
37  }
38 
39  return $users;
40  }
41 
42 
46  public function getAllUserNames($users)
47  {
48  $user_names = array();
49  foreach ($users as $user) {
50  $user_names[] = $user['login'];
51  }
52 
53  return $user_names;
54  }
55 }
Class ilOrgUnitUserQueriesInterface.
__construct()
ilOrgUnitUserQueries constructor.
getAllUserNames($users)
array $user_names
Class ilOrgUnitUserQueries.
findAllUsersByUserIds($user_ids)
array $users
$DIC
Definition: xapitoken.php:46