26 $a_user_image =
false, $a_profile_link =
false, $a_profile_back_link =
"",
27 $a_force_first_lastname =
false, $a_omit_login =
false, $a_sortable =
true)
31 if (!($return_as_array = is_array($a_user_id)))
32 $a_user_id = array($a_user_id);
40 b.value public_profile,
46 (a.usr_id = b.usr_id AND
50 (a.usr_id = c.usr_id AND
52 WHERE ' . $ilDB->in(
'a.usr_id', $a_user_id,
false,
'integer');
54 $userrow = $ilDB->queryF($sql, array(
'text',
'text'), array(
'public_profile',
'public_title'));
58 while (
$row = $ilDB->fetchObject($userrow))
60 if ($a_force_first_lastname ||
61 $has_public_profile = in_array(
$row->public_profile, array(
"y",
"g")))
64 if(
$row->public_title ==
"y" &&
$row->title)
70 $pres =
$row->lastname;
71 if(strlen(
$row->firstname))
73 $pres .= (
', '.$row->firstname.
' ');
79 if(strlen(
$row->firstname))
81 $pres .=
$row->firstname.
' ';
83 $pres .= (
$row->lastname.
' ');
90 $pres.=
"[".$row->login.
"]";
93 if ($a_profile_link && $has_public_profile)
95 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user",
$row->usr_id);
96 if ($a_profile_back_link !=
"")
98 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"back_url",
99 rawurlencode($a_profile_back_link));
101 $pres =
'<a href="'.$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML").
'">'.$pres.
'</a>';
107 $pres =
'<img border="0" src="'.$img.
'" alt="'.$lng->txt(
"icon").
108 " ".$lng->txt(
"user_picture").
'" /> '.$pres;
111 $names[
$row->usr_id] = $pres;
114 foreach($a_user_id as $id)
117 $names[$id] =
"unknown";
120 return $return_as_array ? $names : $names[$a_user_id[0]];