43                $a_user_image = 
false, $a_profile_link = 
false, $a_profile_back_link = 
"",
 
   44                $a_force_first_lastname = 
false, $a_omit_login = 
false, $a_sortable = 
true, $a_return_data_array = 
false)
 
   48                if (!($return_as_array = is_array($a_user_id)))
 
   49                        $a_user_id = array($a_user_id);
 
   57                                        b.value public_profile, 
   63                                                        (a.usr_id = b.usr_id AND 
   67                                                        (a.usr_id = c.usr_id AND 
   69                                WHERE ' . 
$ilDB->in(
'a.usr_id', $a_user_id, 
false, 
'integer');
 
   71                $userrow = 
$ilDB->queryF($sql, array(
'text', 
'text'), array(
'public_profile', 
'public_title'));
 
   76                while (
$row = 
$ilDB->fetchObject($userrow))
 
   79                        $d = array(
"id" => 
$row->usr_id, 
"title" => 
"", 
"lastname" => 
"", 
"firstname" => 
"", 
"img" => 
"", 
"link" => 
"",
 
   80                                "public_profile" => 
"");
 
   81                        $has_public_profile = in_array(
$row->public_profile, array(
"y", 
"g"));
 
   82                        if ($a_force_first_lastname || $has_public_profile)
 
   85                                if(
$row->public_title == 
"y" && 
$row->title)
 
   92                                        $pres = 
$row->lastname;
 
   93                                        if(strlen(
$row->firstname))
 
   95                                                $pres .= (
', '.$row->firstname.
' ');
 
  101                                        if(strlen(
$row->firstname))
 
  103                                                $pres .= 
$row->firstname.
' ';
 
  105                                        $pres .= (
$row->lastname.
' ');
 
  107                                $d[
"firstname"] = 
$row->firstname;
 
  108                                $d[
"lastname"] = 
$row->lastname;
 
  110                        $d[
"login"] = 
$row->login;
 
  111                        $d[
"public_profile"] = $has_public_profile;
 
  116                                $pres.= 
"[".$row->login.
"]";
 
  119                        if ($a_profile_link && $has_public_profile)
 
  121                                $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
$row->usr_id);
 
  122                                if ($a_profile_back_link != 
"")
 
  124                                        $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui", 
"back_url",
 
  125                                                rawurlencode($a_profile_back_link));
 
  127                                $link = 
$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"getHTML");
 
  128                                $pres = 
'<a href="'.$link.
'">'.$pres.
'</a>';
 
  135                                $pres = 
'<img border="0" src="'.$img.
'" alt="'.
$lng->txt(
"icon").
 
  136                                        " ".$lng->txt(
"user_picture").
'" /> '.$pres;
 
  144                foreach($a_user_id as $id)
 
  150                if ($a_return_data_array)
 
  152                        if ($return_as_array)
 
  158                                return current(
$data);
 
  161                return $return_as_array ? 
$names : 
$names[$a_user_id[0]];
 
  174                $set = 
$ilDB->query(
"SELECT value FROM usr_pref ".
 
  175                        " WHERE usr_id = ".
$ilDB->quote($a_user_id, 
"integer").
 
  176                        " and keyword = ".$ilDB->quote(
"public_profile", 
"text")
 
  178                $rec = 
$ilDB->fetchAssoc($set);
 
  180                return in_array($rec[
"value"], array(
"y", 
"g"));
 
  193                if($public_profile != 
'y' and $public_profile != 
'g')
 
  198                $GLOBALS[
'ilCtrl']->setParameterByClass(
'ilpublicuserprofilegui',
'user',$a_usr_id);
 
  199                return $GLOBALS[
'ilCtrl']->getLinkTargetByClass(
'ilpublicuserprofilegui',
'getHTML');
 
  222                if($a_force_all || (
$ilSetting->get(
'disable_my_offers') == 0 &&
 
  223                        $ilSetting->get(
'disable_my_memberships') == 0))
 
  228                if($a_force_all || !
$ilSetting->get(
"disable_personal_workspace"))
 
  233                include_once(
'./Services/Calendar/classes/class.ilCalendarSettings.php');
 
  235                if($a_force_all || $settings->isEnabled())
 
  242                foreach($all as $idx => 
$lang)
 
  261                if($a_value == self::START_REPOSITORY_OBJ)
 
  263                        $a_ref_id = (int)$a_ref_id;
 
  265                                !$tree->isDeleted($a_ref_id))
 
  267                                $ilSetting->set(
"usr_starting_point", $a_value);
 
  268                                $ilSetting->set(
"usr_starting_point_ref_id", $a_ref_id);
 
  272                $valid = array_keys(self::getPossibleStartingPoints());
 
  273                if(in_array($a_value, 
$valid))
 
  275                        $ilSetting->set(
"usr_starting_point", $a_value);
 
  290                $valid = array_keys(self::getPossibleStartingPoints());         
 
  291                $current = 
$ilSetting->get(
"usr_starting_point");       
 
  292                if($current == self::START_REPOSITORY_OBJ)
 
  296                else if(!$current || !in_array($current, 
$valid))
 
  301                        if(
$ilSetting->get(
'disable_my_offers') == 0 &&
 
  302                                $ilSetting->get(
'disable_my_memberships') == 0 &&
 
  303                                $ilSetting->get(
'personal_items_default_view') == 1)
 
  310                if(
$ilUser->getId() == ANONYMOUS_USER_ID ||
 
  328                if(self::hasPersonalStartingPoint())
 
  331                        if($current == self::START_REPOSITORY_OBJ)
 
  339                        if($current == self::START_REPOSITORY_OBJ)
 
  352                                        include_once(
'./Services/Link/classes/class.ilLink.php');
 
  361                                        self::START_PD_OVERVIEW => 
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems',
 
  362                                        self::START_PD_SUBSCRIPTION => 
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToMemberships',
 
  366                                        self::START_PD_WORKSPACE => 
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace',
 
  370                                        self::START_PD_CALENDAR => 
'ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToCalendar',
 
  376                                return $map[$current];          
 
  389                return $ilSetting->get(
"usr_starting_point_ref_id");
 
  401                $ilSetting->set(
"usr_starting_point_personal", (
bool)$a_value);         
 
  413                return $ilSetting->get(
"usr_starting_point_personal");
 
  425                return (
bool)
$ilUser->getPref(
"usr_starting_point");    
 
  437                $valid = array_keys(self::getPossibleStartingPoints());
 
  438                $current = 
$ilUser->getPref(
"usr_starting_point");      
 
  439                if($current == self::START_REPOSITORY_OBJ)
 
  443                else if(!$current || !in_array($current, 
$valid))
 
  463                        $ilUser->setPref(
"usr_starting_point", 
null);
 
  464                        $ilUser->setPref(
"usr_starting_point_ref_id", 
null);
 
  468                if($a_value == self::START_REPOSITORY_OBJ)
 
  470                        $a_ref_id = (int)$a_ref_id;
 
  472                                !$tree->isDeleted($a_ref_id))
 
  474                                $ilUser->setPref(
"usr_starting_point", $a_value);
 
  475                                $ilUser->setPref(
"usr_starting_point_ref_id", $a_ref_id);
 
  479                $valid = array_keys(self::getPossibleStartingPoints());
 
  480                if(in_array($a_value, 
$valid))
 
  482                        $ilUser->setPref(
"usr_starting_point", $a_value);
 
for($col=0; $col< 50; $col++) $d
An exception for terminatinating execution or to throw for unit testing.
static _getInstance()
get singleton instance
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _lookupPref($a_usr_id, $a_keyword)
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
static _lookupObjId($a_id)
static getPersonalStartingObject()
Get ref id of personal starting object.
static getPossibleStartingPoints($a_force_all=false)
Get all valid starting points.
static hasPersonalStartPointPref()
Did user set any personal starting point (yet)?
static hasPersonalStartingPoint()
Can starting point be personalized?
static hasPublicProfile($a_user_id)
Has public profile.
static togglePersonalStartingPoint($a_value)
Toggle personal starting point setting.
static getPersonalStartingPoint()
Get current personal starting point.
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:
static getStartingPoint()
Get current starting point setting.
static getProfileLink($a_usr_id)
Get link to personal profile Return empty string in case of not public profile.
static setPersonalStartingPoint($a_value, $a_ref_id=null)
Set personal starting point setting.
static getStartingPointAsUrl()
Get current starting point setting as URL.
static getStartingObject()
Get ref id of starting object.
const START_REPOSITORY_OBJ
const START_PD_SUBSCRIPTION
static setStartingPoint($a_value, $a_ref_id=null)
Set starting point setting.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang