ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAwarenessUserProviderAllUsers.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Awareness/classes/class.ilAwarenessUserProvider.php");
6 
15 {
16 
20  public function __construct()
21  {
22  global $DIC;
23 
24  parent::__construct();
25 
26  $this->db = $DIC->database();
27  }
28 
34  public function getProviderId()
35  {
36  return "user_all";
37  }
38 
44  public function getTitle()
45  {
46  $this->lng->loadLanguageModule("user");
47  return $this->lng->txt("user_awrn_all_users");
48  }
49 
55  public function getInfo()
56  {
57  $this->lng->loadLanguageModule("user");
58  return $this->lng->txt("user_awrn_all_users_info");
59  }
60 
66  public function getInitialUserSet()
67  {
68  $ilDB = $this->db;
69 
70  $ub = array();
71  // all online users
72  if ($this->getOnlineUserFilter() !== false) {
73  foreach ($this->getOnlineUserFilter() as $u) {
74  $ub[] = $u;
75  }
76  } else { // all users
77  $set = $ilDB->query("SELECT usr_id FROM usr_data ");
78  while ($rec = $ilDB->fetchAssoc($set)) {
79  $ub[] = $rec["usr_id"];
80  }
81  }
82  return $ub;
83  }
84 }
global $DIC
Definition: saml.php:7
getInfo()
Provider info (used in administration settings)
A class that provides a collection of users for the awareness tool.
getTitle()
Provider title (used in awareness overlay and in administration settings)
global $ilDB
getOnlineUserFilter()
Get online user filter.