49         $this->
ilias = $DIC[
'ilias'];
    50         $this->db = $DIC[
'ilDB'];
    51         $this->
lng = $DIC[
'lng'];
    52         $this->user_id = $DIC[
'ilUser']->getId();
    54         $this->attach_roles = 
false;
    61         $this->attach_roles = $value;
    72         if (!is_array($this->users)) {
    79         $udf_data->addToXML($this);
    81         foreach ($this->users as $user) {
    98         $this->
xmlSetDtdDef(
'<!DOCTYPE Users PUBLIC "-//ILIAS//DTD UserImport//EN" "' . ILIAS_HTTP_PATH . 
'/xml/ilias_user_5_1.dtd">');
   118         if ($row[
'language'] === null
   119             || $row[
'language'] === 
'') {
   120             $row[
'language'] = $this->
lng->getDefaultLanguage();
   124             'Id' => 
'il_' . 
IL_INST_ID . 
'_usr_' . $row[
'usr_id'],
   125             'Language' => $row[
'language'],
   131         $this->
xmlElement(
'Login', null, $row[
'login']);
   133         if ($this->attach_roles == 
true) {
   135                 'SELECT object_data.title, object_data.description,  rbac_fa.* ' .
   136                             'FROM object_data, rbac_ua, rbac_fa WHERE rbac_ua.usr_id = %s ' .
   137                             'AND rbac_ua.rol_id = rbac_fa.rol_id AND object_data.obj_id = rbac_fa.rol_id',
   138                 $this->db->quote($row[
'usr_id'], 
'integer')
   140             $rbacresult = $this->db->query($query);
   143                 if ($rbacrow[
'assign'] != 
'y') {
   157                         [
'Id' => 
'il_' . 
IL_INST_ID . 
'_role_' . $rbacrow[
'rol_id'], 
'Type' => $type],
   168         if ($this->
canExport(
'PersonalPicture', 
'upload')) {
   171                 $value = array_shift($imageData); 
   172                 $this->
__addElement(
'PersonalPicture', $value, $imageData, 
'upload');
   179         $this->
__addElement(
'SecondEmail', $row[
'second_email'], null, 
'second_email');
   181         $this->
__addElement(
'Institution', $row[
'institution']);
   184         $this->
__addElement(
'PostalCode', $row[
'zipcode'], null, 
'zipcode');
   186         $this->
__addElement(
'SelCountry', $row[
'sel_country'], null, 
'sel_country');
   187         $this->
__addElement(
'PhoneOffice', $row[
'phone_office'], null, 
'phone_office');
   188         $this->
__addElement(
'PhoneHome', $row[
'phone_home'], null, 
'phone_home');
   189         $this->
__addElement(
'PhoneMobile', $row[
'phone_mobile'], null, 
'phone_mobile');
   193         $this->
__addElementMulti(
'GeneralInterest', $row[
'interests_general'] ?? [], null, 
'interests_general');
   194         $this->
__addElementMulti(
'OfferingHelp', $row[
'interests_help_offered'] ?? [], null, 
'interests_help_offered');
   195         $this->
__addElementMulti(
'LookingForHelp', $row[
'interests_help_looking'] ?? [], null, 
'interests_help_looking');
   198         $this->
__addElement(
'Comment', $row[
'referral_comment'], null, 
'referral_comment');
   199         $this->
__addElement(
'Matriculation', $row[
'matriculation']);
   200         $this->
__addElement(
'Active', $row[
'active'] ? 
'true' : 
'false');
   201         $this->
__addElement(
'ClientIP', $row[
'client_ip'], null, 
'client_ip');
   202         $this->
__addElement(
'TimeLimitOwner', $row[
'time_limit_owner'], null, 
'time_limit_owner');
   203         $this->
__addElement(
'TimeLimitUnlimited', $row[
'time_limit_unlimited'], null, 
'time_limit_unlimited');
   204         $this->
__addElement(
'TimeLimitFrom', $row[
'time_limit_from'], null, 
'time_limit_from');
   205         $this->
__addElement(
'TimeLimitUntil', $row[
'time_limit_until'], null, 
'time_limit_until');
   206         $this->
__addElement(
'TimeLimitMessage', $row[
'time_limit_message'], null, 
'time_limit_message');
   207         $this->
__addElement(
'ApproveDate', $row[
'approve_date'], null, 
'approve_date');
   208         $this->
__addElement(
'AgreeDate', $row[
'agree_date'], null, 
'agree_date');
   210         if ($row[
'auth_mode'] !== null
   211             && $row[
'auth_mode'] !== 
'') {
   212             $this->
__addElement(
'AuthMode', null, [
'type' => $row[
'auth_mode']], 
'auth_mode', 
true);
   215         if ($row[
'ext_account'] !== null
   216             && $row[
'ext_account'] !== 
'') {
   217             $this->
__addElement(
'ExternalAccount', $row[
'ext_account'], null, 
'ext_account', 
true);
   220         if (isset($prefs[
'skin'])
   221             && isset($prefs[
'style'])
   222             && $this->
canExport(
'Look', 
'skin_style')) {
   227                     'Skin' => $prefs[
'skin'], 
'Style' => $prefs[
'style']
   235         $this->
__addElement(
'LastUpdate', $row[
'last_update'], null, 
'last_update');
   236         $this->
__addElement(
'LastLogin', $row[
'last_login'], null, 
'last_login');
   239         $udf_data->addToXML($this);
   241         $this->
__addElement(
'AccountInfo', $row[
'ext_account'], [
'Type' => 
'external']);
   244             'longitude' => $row[
'longitude'],
   245             'latitude' => $row[
'latitude'],
   246             'zoom' => $row[
'loc_zoom']]);
   250         if ($this->attach_preferences || $this->
canExport(
'prefs', 
'preferences')) {
   262         $prefs[
'mail_incoming_type'] = $mailOptions->getIncomingType();
   263         $prefs[
'mail_address_option'] = $mailOptions->getEmailAddressMode();
   264         $prefs[
'mail_signature'] = $mailOptions->getSignature();
   267             foreach ($prefs as 
$key => $value) {
   268                 if (self::isPrefExportable(
$key)) {
   279         ?array $attrs = null,
   280         ?
string $settingsname = null,
   281         bool $requiredTag = 
false   283         foreach ($value as $item) {
   284             $this->
__addElement($tagname, $item, $attrs, $settingsname, $requiredTag);
   292         ?
string $settingsname = null,
   293         bool $requiredTag = 
false   295         if ($this->
canExport($tagname, $settingsname)
   298                 || is_array($attrs) && count($attrs) > 0)) {
   299             $this->
xmlElement($tagname, $attrs, (
string) $value);
   305         ?
string $settingsname = null
   308             || in_array(strtolower($tagname), $this->
settings) !== 
false   309             || in_array($settingsname, $this->
settings) !== 
false;
   324         $avatar_resolver->setForcePicture(
true);
   325         if (!$avatar_resolver->hasProfilePicture()) {
   329         [$image_data, $image_type] = $avatar_resolver->getUserPictureForVCard();
   331         if ($image_data === null || $image_type === null) {
   336             'value' => base64_encode($image_data),
   337             'encoding' => 
'Base64',
   338             'imagetype' => $image_type
   362                 'public_second_email',
   365                 'public_institution',
   366                 'public_matriculation',
   369                 'public_phone_mobile',
   370                 'public_phone_office',
   377                 'hide_own_online_status',
   378                 'bs_allow_to_contact_me',
   379                 'chat_osc_accept_msg',
   380                 'chat_broadcast_typing',
   383                 'mail_incoming_type',
   386                 'public_interests_general',
   387                 'public_interests_help_offered',
   388                 'public_interests_help_looking'   397         return in_array($key, self::getExportablePreferences());
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
__handlePreferences(array $prefs, array $row)
 
Class ChatMainBarProvider . 
 
static _getPreferences(int $user_id)
get preferences for user 
 
getPictureValue(int $usr_id)
return array with base-encoded picture data as key value, encoding type as encoding, and image type as key type. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
xmlSetGenCmt(string $genCmt)
Sets generated comment. 
 
canExport(string $tagname, ?string $settingsname=null)
 
setAttachPreferences(bool $attach_preferences)
if set to true, all preferences of a user will be set 
 
static getExportSettings()
 
xmlEndTag(string $tag)
Writes an endtag. 
 
xmlSetDtdDef(string $dtdDef)
Sets dtd definition. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
array $settings
fields to be exported 
 
__addElementMulti(string $tagname, array $value, ?array $attrs=null, ?string $settingsname=null, bool $requiredTag=false)
 
header include for all ilias files. 
 
xmlHeader()
Writes xml header. 
 
__addElement(string $tagname, ?string $value, array $attrs=null, ?string $settingsname=null, bool $requiredTag=false)
 
Class ilUserAvatarResolver. 
 
setSettings(array $settings)
 
static isPrefExportable(string $key)
returns wether a key from db is exportable or not 
 
setAttachRoles(bool $value)
 
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag. 
 
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content) 
 
__construct(string $version="1.0", string $outEnc="utf-8", string $inEnc="utf-8")
 
static getExportablePreferences()
return exportable preference keys as found in db 
 
xmlDumpMem(bool $format=true)
Returns xml document from memory.