ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilAbstractGalleryUsers.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/User/interfaces/interface.ilGalleryUsers.php';
5 require_once 'Services/User/classes/class.ilUserUtil.php';
6 
10 abstract class ilAbstractGalleryUsers implements ilGalleryUsers
11 {
16  protected function collectUserDetails(array $user_data)
17  {
21  global $ilUser;
22 
23  $sortable_names = ilUserUtil::getNamePresentation(array_keys($user_data));
24  $names = ilUserUtil::getNamePresentation(array_keys($user_data), false, false, '', false, false, false);
25 
26  foreach($user_data as $id => &$data)
27  {
31  $user = $data['user'];
32 
33  $profile_published = false;
34  if((!$ilUser->isAnonymous() && $user->getPref('public_profile') == 'y') || $user->getPref('public_profile') == 'g')
35  {
36  $profile_published = true;
37  }
38 
39  $data['sort'] = $sortable_names[$user->getId()];
40  $data['public_profile'] = $profile_published;
41  $data['public_name'] = $names[$user->getId()];
42  }
43 
44  return $user_data;
45  }
46 }
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
Interface ilGalleryUsers.
Class ilAbstractGalleryUsers.