Get data.
153 $max = $awrn_set->
get(
"max_nr_entries");
155 $all_user_ids = array();
156 $hall_user_ids = array();
158 if ($this->data == null) {
159 $online_users = $this->user_collector->getOnlineUsers();
163 $this->data = array();
168 if (count($this->data) >= $max) {
172 $user_collection = $uc[
"collection"];
173 $user_ids = $user_collection->getUsers();
175 foreach ($user_ids as $uid) {
176 if (!in_array($uid, $all_user_ids)) {
177 if ($uc[
"highlighted"]) {
178 $hall_user_ids[] = $uid;
180 $all_user_ids[] = $uid;
197 foreach ($names as $k => $n) {
198 if (isset($online_users[$n[
"id"]])) {
199 $names[$k][
"online"] =
true;
200 $names[$k][
"last_login"] = $online_users[$n[
"id"]][
"last_login"];
203 $names[$k][
"online"] =
false;
204 $names[$k][
"last_login"] =
"";
207 if ($n[
"public_profile"]) {
208 $sort_str .= $n[
"lastname"] .
" " . $n[
"firstname"];
210 $sort_str .= $n[
"login"];
212 $names[$k][
"sort_str"] = $sort_str;
217 foreach ($names as $n) {
219 if (count($this->data) >= $max) {
224 $filter = trim($filter);
226 !is_int(stripos($n[
"login"], $filter)) &&
228 !$n[
"public_profile"] || (
229 !is_int(stripos($n[
"firstname"], $filter)) &&
230 !is_int(stripos($n[
"lastname"], $filter))
237 $obj = new \stdClass();
238 $obj->lastname = $n[
"lastname"];
239 $obj->firstname = $n[
"firstname"];
240 $obj->login = $n[
"login"];
242 $obj->collector = $uc[
"uc_title"];
243 $obj->highlighted = $uc[
"highlighted"];
247 $obj->public_profile = $n[
"public_profile"];
249 $obj->online = $n[
"online"];
250 $obj->last_login = $n[
"last_login"];
253 $action_collection = $this->action_collector->getActionsForTargetUser($n[
"id"]);
254 $obj->actions = array();
255 foreach ($action_collection->getActions() as $action) {
256 $f = new \stdClass();
257 $f->text = $action->getText();
258 $f->href = $action->getHref();
259 $f->data = $action->getData();
260 $obj->actions[] =
$f;
263 $this->data[] = $obj;
270 count($all_user_ids),
271 count($hall_user_ids)
274 return array(
"data" => $this->data,
"cnt" => count($all_user_ids) .
":" . count($hall_user_ids));
get(string $a_keyword, ?string $a_default_value=null)
get setting
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)