ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilOrgUnitUserQueries.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  protected \ILIAS\DI\Container $dic;
26 
30  public function __construct()
31  {
32  global $DIC;
33  $this->dic = $DIC;
34  }
35 
39  public function findAllUsersByUserIds(array $user_ids): array
40  {
41  $users = array();
42  foreach ($user_ids as $user_id) {
43  $q = "SELECT * FROM usr_data WHERE usr_id = " . $this->dic->database()->quote($user_id, "integer");
44  $usr_set = $this->dic->database()->query($q);
45  $users[] = $this->dic->database()->fetchAssoc($usr_set);
46  }
47 
48  return $users;
49  }
50 
54  public function getAllUserNames(array $users): array
55  {
56  $user_names = array();
57  foreach ($users as $user) {
58  $user_names[] = $user['login'];
59  }
60 
61  return $user_names;
62  }
63 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct()
ilOrgUnitUserQueries constructor.
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$q
Definition: shib_logout.php:21
findAllUsersByUserIds(array $user_ids)