5include_once 
'Services/Mail/classes/class.ilMailOptions.php';
 
   51                                                "method" => 
"getLogin",
 
   52                                                "course_export_fix_value" => 1,
 
   53                                                "group_export_fix_value" => 1,
 
   54                                                "changeable_hide" => 
true,
 
   55                                                "required_hide" => 
true,
 
   56                                                "group" => 
"personal_data"),
 
   58                                                "input" => 
"password",
 
   59                                                "required_hide" => 
true,
 
   60                                                "visib_reg_hide" => 
true,
 
   61                                                'visib_lua_fix_value' => 0,
 
   62                                                "course_export_hide" => 
true,
 
   63                                                "export_hide" => 
false,
 
   64                                                "group_export_hide" => 
true,
 
   66                                                "group" => 
"personal_data"),
 
   71                                                "method" => 
"getFirstname",
 
   72                                                "required_fix_value" => 1,
 
   73                                                "visib_reg_fix_value" => 1,
 
   74                                                'visib_lua_fix_value' => 1,
 
   75                                                "course_export_fix_value" => 1,
 
   76                                                "group_export_fix_value" => 1,
 
   77                                                "group" => 
"personal_data"),
 
   82                                                "method" => 
"getLastname",
 
   83                                                "required_fix_value" => 1,
 
   84                                                "visib_reg_fix_value" => 1,
 
   85                                                'visib_lua_fix_value' => 1,
 
   86                                                "course_export_fix_value" => 1,
 
   87                                                "group_export_fix_value" => 1,
 
   88                                                "group" => 
"personal_data"),
 
   91                                                "lang_var" => 
"person_title",
 
   94                                                "method" => 
"getUTitle",
 
   95                                                "group" => 
"personal_data"),
 
   97                                                "input" => 
"birthday",
 
   98                                                "lang_var" => 
"birthday",
 
  101                                                "method" => 
"getBirthday",
 
  102                                                "group" => 
"personal_data"),
 
  105                                                "values" => array(
"f" => 
"gender_f", 
"m" => 
"gender_m"),
 
  106                                                "method" => 
"getGender",
 
  107                                                "group" => 
"personal_data"),
 
  109                                                "input" => 
"picture",
 
  110                                                "required_hide" => 
true,
 
  111                                                "visib_reg_hide" => 
true,
 
  112                                                "course_export_hide" => 
true,
 
  113                                                "group_export_hide" => 
true,
 
  114                                                "lists_hide" => 
true,
 
  115                                                "lang_var" => 
"personal_picture",
 
  116                                                "group" => 
"personal_data"),
 
  119                                                "changeable_hide" => 
true,
 
  120                                                "required_hide" => 
true,
 
  121                                                "visib_reg_hide" => 
true,
 
  122                                                "export_hide" => 
true,
 
  123                                                "course_export_hide" => 
true,
 
  124                                                "group_export_hide" => TRUE,
 
  125                                                "lists_hide" => 
true,
 
  126                                                "group" => 
"personal_data"),
 
  127                "interests_general" => array(
 
  128                                                "input" => 
"multitext",
 
  131                                                "method" => 
"getGeneralInterests",
 
  132                                                "course_export_hide" => 
true,
 
  133                                                "group_export_hide" => 
true,
 
  134                                                "lists_hide" => 
true,                                                                                                           
 
  135                                                "group" => 
"interests"),
 
  136                "interests_help_offered" => array(
 
  137                                                "input" => 
"multitext",
 
  140                                                "method" => 
"getOfferingHelp",
 
  141                                                "course_export_hide" => 
true,
 
  142                                                "group_export_hide" => 
true,                                            
 
  143                                                "lists_hide" => 
true,                                                                   
 
  144                                                "group" => 
"interests"),
 
  145                "interests_help_looking" => array(
 
  146                                                "input" => 
"multitext",
 
  149                                                "method" => 
"getLookingForHelp",
 
  150                                                "course_export_hide" => 
true,
 
  151                                                "group_export_hide" => 
true,
 
  152                                                "lists_hide" => 
true,                                                           
 
  153                                                "group" => 
"interests"),
 
  154                "institution" => array(
 
  158                                                "method" => 
"getInstitution",
 
  159                                                "group" => 
"contact_data"),
 
  160                "department" => array(
 
  164                                                "method" => 
"getDepartment",
 
  165                                                "group" => 
"contact_data"),
 
  170                                                "method" => 
"getStreet",
 
  171                                                "group" => 
"contact_data"),
 
  176                                                "method" => 
"getZipcode",
 
  177                                                "group" => 
"contact_data"),
 
  182                                                "method" => 
"getCity",
 
  183                                                "group" => 
"contact_data"),
 
  188                                                "method" => 
"getCountry",
 
  189                                                "group" => 
"contact_data"),
 
  190                "sel_country" => array(
 
  191                                                "input" => 
"sel_country",
 
  192                                                "method" => 
"getSelectedCountry",
 
  193                                                "group" => 
"contact_data"),
 
  194                "phone_office" => array(
 
  198                                                "method" => 
"getPhoneOffice",
 
  199                                                "group" => 
"contact_data"),
 
  200                "phone_home" => array(
 
  204                                                "method" => 
"getPhoneHome",
 
  205                                                "group" => 
"contact_data"),
 
  206                "phone_mobile" => array(
 
  210                                                "method" => 
"getPhoneMobile",
 
  211                                                "group" => 
"contact_data"),
 
  216                                                "method" => 
"getFax",
 
  217                                                "group" => 
"contact_data"),
 
  222                                                "method" => 
"getEmail",
 
  223                                                "group" => 
"contact_data"),
 
  225                                                "input" => 
"textarea",
 
  228                                                "method" => 
"getHobby",
 
  229                                                "lists_hide" => 
true,
 
  230                                                "group" => 
"contact_data"),
 
  231                "referral_comment" => array(
 
  232                                                "input" => 
"textarea",
 
  235                                                "method" => 
"getComment",
 
  236                                                "course_export_hide" => 
true,
 
  237                                                "group_export_hide" => 
true,
 
  238                                                "lists_hide" => 
true,
 
  239                                                "group" => 
"contact_data"),     
 
  240                "instant_messengers" => array(
 
  241                                                "input" => 
"messenger",
 
  242                                                "types" => array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip"), 
 
  245                                                "course_export_hide" => 
true,
 
  246                                                "group_export_hide" => 
true,
 
  247                                                "lists_hide" => 
true,
 
  248                                                "required_hide" => 
true, 
 
  249                                                "group" => 
"instant_messengers"),
 
  250                "matriculation" => array(
 
  254                                                "method" => 
"getMatriculation",
 
  256                "delicious" => array(
 
  260                                                "method" => 
"getDelicious",
 
  263                                                "input" => 
"language",
 
  264                                                "method" => 
"getLanguage",
 
  265                                                "required_hide" => 
true,
 
  266                                                "visib_reg_hide" => 
true,
 
  267                                                "course_export_hide" => 
true,
 
  268                                                "group_export_hide" => 
true,
 
  269                                                "group" => 
"settings"),
 
  270                "skin_style" => array(
 
  271                                                "input" => 
"skinstyle",
 
  272                                                "required_hide" => 
true,
 
  273                                                "visib_reg_hide" => 
true,
 
  274                                                "course_export_hide" => 
true,
 
  275                                                "group_export_hide" => 
true,
 
  276                                                "group" => 
"settings"),
 
  277                "hits_per_page" => array(
 
  278                                                "input" => 
"hitsperpage",
 
  281                                                        10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
 
  282                                                        50 => 50, 100 => 100, 9999 => 9999),
 
  283                                                "required_hide" => 
true,
 
  284                                                "visib_reg_hide" => 
true,
 
  285                                                "course_export_hide" => 
true,
 
  286                                                "group_export_hide" => 
true,
 
  287                                                "group" => 
"settings"),
 
  300                "hide_own_online_status" => array(
 
  301                                                "input" => 
"selection",
 
  302                                                "lang_var" => 
"awrn_hide_from_awareness",
 
  303                                                "required_hide" => 
true,
 
  304                                                "visib_reg_hide" => 
true,
 
  305                                                "course_export_hide" => 
true,
 
  306                                                "group_export_hide" => 
true,
 
  307                                                "group" => 
"settings"),
 
  308                "bs_allow_to_contact_me" => array(
 
  309                        "input" => 
"selection",
 
  310                        "lang_var" => 
"buddy_allow_to_contact_me",
 
  311                        "required_hide" => 
true,
 
  312                        "visib_reg_hide" => 
true,
 
  313                        "course_export_hide" => 
true,
 
  314                        "group_export_hide" => 
true,
 
  315                        "group" => 
"settings"),
 
  316                "preferences" => array(
 
  317                                                "visible_fix_value" => 1,
 
  318                                                "changeable_fix_value" => 1,
 
  319                                                "required_hide" => 
true,
 
  320                                                "visib_reg_hide" => 
true,
 
  321                                                "course_export_hide" => 
true,
 
  322                                                "group_export_hide" => 
true,
 
  323                                                "group" => 
"preferences"),
 
  324                "mail_incoming_mail" => array(
 
  325                                                "input" => 
"selection",
 
  331                                                "required_hide" => 
true,
 
  332                                                "visib_reg_hide" => 
true,
 
  333                                                "course_export_hide" => 
true,
 
  334                                                "group_export_hide" => 
true,
 
  335                                                "export_hide" => 
true,
 
  336                                                "search_hide" => 
true,
 
  337                                                "group" => 
"settings")
 
  348                $this->skip_groups = array();
 
  349                $this->skip_fields = array();
 
  353                $lng->loadLanguageModule(
"awrn");
 
  354                $lng->loadLanguageModule(
"buddysystem");
 
  363                foreach (self::$user_field as $f => $p)
 
  366                        if (in_array($p[
"group"], $this->skip_groups) ||
 
  367                                in_array($f, $this->skip_fields))
 
  389                        if(
$ilSetting->get(
'usr_settings_visib_lua_'.$field,1))
 
  391                                $fields[$field] = 
$info;
 
  393                        elseif(
$info[
'visib_lua_fix_value'])
 
  395                                $fields[$field] = 
$info;
 
  407                $this->skip_groups[] = $a_group;
 
  415                $this->skip_fields[] = $a_field;
 
  426                if(self::$mode == self::MODE_REGISTRATION)
 
  428                        include_once 
'Services/Registration/classes/class.ilRegistrationSettings.php';
 
  431                        self::$user_field[
"username"][
"group"] = 
"login_data";
 
  432                        self::$user_field[
"password"][
"group"] = 
"login_data";
 
  433                        self::$user_field[
"language"][
"default"] = 
$lng->lang_key;
 
  436                        $roles = self::$user_field[
"roles"];
 
  437                        unset(self::$user_field[
"roles"]);
 
  438                        self::$user_field[
"roles"] = $roles;
 
  439                        self::$user_field[
"roles"][
"group"] = 
"settings";                       
 
  444                $custom_fields_done = 
false;
 
  445                foreach ($fields as $f => $p)
 
  448                        if (($p[
"group"] != $current_group) &&
 
  451                                if (is_array($custom_fields) && !$custom_fields_done)
 
  454                                        if($current_group == 
"other" || $p[
"group"] == 
"settings")
 
  457                                                if($current_group != 
"other")
 
  460                                                        $sh->setTitle(
$lng->txt(
"other"));
 
  461                                                        $a_form->addItem($sh);
 
  463                                                foreach($custom_fields as $custom_field)
 
  465                                                        $a_form->addItem($custom_field);
 
  467                                                $custom_fields_done = 
true;
 
  472                                $sh->setTitle(
$lng->txt($p[
"group"]));
 
  473                                $a_form->addItem($sh);
 
  474                                $current_group = $p[
"group"];
 
  478                        if (isset($p[
"method"]))
 
  483                        $lv = (isset($p[
"lang_var"]) && $p[
"lang_var"] != 
"")
 
  495                                                        $val->setValue($a_user->getLogin());
 
  497                                                $val->setMaxLength($p[
'maxlength']);
 
  499                                                $val->setRequired(
true);
 
  507                                                        $val->setValue($a_user->getLogin());
 
  510                                        $a_form->addItem($val);
 
  519                                                        $ti->setValue($a_user->$m());
 
  521                                                $ti->setMaxLength($p[
"maxlength"]);
 
  522                                                $ti->setSize($p[
"size"]);
 
  523                                                $ti->setRequired(
$ilSetting->get(
"require_".$f));                                       
 
  524                                                if(!$ti->getRequired() || $ti->getValue())
 
  526                                                        $ti->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  528                                                $a_form->addItem($ti);
 
  535                                                include_once(
"./Services/Form/classes/class.ilCountrySelectInputGUI.php");
 
  539                                                        $ci->setValue($a_user->$m());
 
  541                                                $ci->setRequired(
$ilSetting->get(
"require_".$f));
 
  542                                                if(!$ci->getRequired() || $ci->getValue())
 
  544                                                        $ci->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  546                                                $a_form->addItem($ci);
 
  554                                                include_once 
"./Services/Calendar/classes/class.ilDateTime.php";
 
  556                                                if ($a_user && strlen($a_user->$m()))
 
  561                                                $bi->setShowEmpty(
true);
 
  562                                                $bi->setStartYear(1900);
 
  563                                                $bi->setRequired(
$ilSetting->get(
"require_".$f));
 
  564                                                if(!$bi->getRequired() || $date)
 
  566                                                        $bi->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  568                                                $a_form->addItem($bi);
 
  578                                                        $rg->setValue($a_user->$m());
 
  580                                                foreach  ($p[
"values"] as $k => $v)
 
  585                                                $rg->setRequired(
$ilSetting->get(
"require_".$f));
 
  586                                                if(!$rg->getRequired() || $rg->getValue())
 
  588                                                        $rg->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  590                                                $a_form->addItem($rg);
 
  598                                                $ii->setDisabled(
$ilSetting->get(
"usr_settings_disable_upload"));
 
  600                                                $upload = $a_form->getFileUpload(
"userfile");
 
  603                                                        $ii->setPending($upload[
"name"]);
 
  612                                                                $ii->setAlt(
$lng->txt(
"personal_picture"));
 
  616                                                $a_form->addItem($ii);
 
  621                                        if(self::$mode == self::MODE_DESKTOP)
 
  625                                                        $global_roles = $rbacreview->getGlobalRoles();
 
  626                                                        foreach($global_roles as $role_id)
 
  628                                                                if (in_array($role_id,$rbacreview->assignedRoles($a_user->getId())))
 
  630                                                                        $roleObj = $ilias->obj_factory->getInstanceByObjId($role_id);
 
  631                                                                        $role_names .= $roleObj->getTitle().
", ";
 
  636                                                        $dr->setValue(substr($role_names,0,-2));
 
  637                                                        $a_form->addItem($dr);
 
  640                                        else if(self::$mode == self::MODE_REGISTRATION)
 
  642                                                if($registration_settings->roleSelectionEnabled())
 
  644                                                        include_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
 
  648                                                                $options[$role[
"id"]] = $role[
"title"];
 
  657                                                                        $ta->setRequired(
$ilSetting->get(
"require_".$f));
 
  658                                                                        if(!$ta->getRequired())
 
  660                                                                                $ta->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  667                                                                        $ta->setValue(array_shift(array_keys(
$options)));
 
  669                                                                $a_form->addItem($ta);
 
  681                                                        $em->setValue($a_user->$m());
 
  683                                                $em->setRequired(
$ilSetting->get(
"require_".$f));
 
  684                                                if(!$em->getRequired() || $em->getValue())
 
  686                                                        $em->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  688                                                if(self::MODE_REGISTRATION == self::$mode)
 
  690                                                        $em->setRetype(
true);
 
  692                                                $a_form->addItem($em);
 
  702                                                        $ta->setValue($a_user->$m());
 
  704                                                $ta->setRows($p[
"rows"]);
 
  705                                                $ta->setCols($p[
"cols"]);
 
  706                                                $ta->setRequired(
$ilSetting->get(
"require_".$f));
 
  707                                                if(!$ta->getRequired() || $ta->getValue())
 
  709                                                        $ta->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  711                                                $a_form->addItem($ta);
 
  718                                                $im_arr = $p[
"types"];
 
  719                                                foreach ($im_arr as $im_name)
 
  724                                                                $im->setValue($a_user->getInstantMessengerId($im_name));
 
  726                                                        $im->setMaxLength($p[
"maxlength"]);
 
  727                                                        $im->setSize($p[
"size"]);
 
  729                                                        if(!$im->getRequired() || $im->getValue())
 
  731                                                                $im->setDisabled(
$ilSetting->get(
"usr_settings_disable_".
"instant_messengers"));
 
  733                                                        $a_form->addItem($im);
 
  739                                        if (self::$mode == self::MODE_REGISTRATION)
 
  741                                                if(!$registration_settings->passwordGenerationEnabled())
 
  744                                                        $ta->setRequired(
true);
 
  750                                                        $ta->setValue(
$lng->txt(
"reg_passwd_via_mail"));
 
  752                                                $a_form->addItem($ta);
 
  762                                                        $ta->setValue($a_user->$m());
 
  765                                                $lng->loadLanguageModule(
"meta");
 
  766                                                foreach (
$lng->getInstalledLanguages() as $lang_key)
 
  772                                                $ta->setRequired(
$ilSetting->get(
"require_".$f));
 
  773                                                if(!$ta->getRequired() || $ta->getValue())
 
  775                                                        $ta->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  777                                                $a_form->addItem($ta);
 
  788                                                        $ti->setValue($a_user->$m());
 
  790                                                $ti->setMaxLength($p[
"maxlength"]);
 
  791                                                $ti->setSize($p[
"size"]);
 
  792                                                $ti->setRequired(
$ilSetting->get(
"require_".$f));                                       
 
  793                                                if(!$ti->getRequired() || $ti->getValue())
 
  795                                                        $ti->setDisabled(
$ilSetting->get(
"usr_settings_disable_".$f));
 
  800                                                        $ti->setDataSource($this->ajax_href.
"&f=".$f);
 
  802                                                $a_form->addItem($ti);
 
  809                if(is_array($custom_fields) && !$custom_fields_done)
 
  812                        if($current_group != 
"other")
 
  815                                $sh->setTitle(
$lng->txt(
"other"));
 
  816                                $a_form->addItem($sh);
 
  818                        foreach($custom_fields as $custom_field)
 
  820                                $a_form->addItem($custom_field);
 
  827                $this->ajax_href = $a_href;
 
  837                if(self::$mode == self::MODE_DESKTOP)
 
  839                        return (
$ilSetting->get(
"usr_settings_hide_".$a_setting) != 1);
 
  843                        if(isset(self::$user_field[$a_setting][
"visib_reg_hide"]) && self::$user_field[$a_setting][
"visib_reg_hide"] === 
true)
 
  847                        return (
$ilSetting->get(
"usr_settings_visib_reg_".$a_setting, 
"1") || 
$ilSetting->get(
"require_".$a_setting, 
"0"));
 
  855                if(in_array(
$mode, array(self::MODE_DESKTOP, self::MODE_REGISTRATION)))
 
  876                foreach(self::$user_field as $field => $definition)
 
  879                        if($a_personal_data_only && 
$ilSetting->get(
"usr_settings_hide_".$field))
 
  884                        if(
$ilSetting->get(
"require_".$field) && $definition[
"method"])
 
  886                                $value = $a_user->{$definition[
"method"]}();
 
  897                        $user_defined_data = $a_user->getUserDefinedData();
 
  899                        include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  901                        foreach($user_defined_fields->getRequiredDefinitions() as $field => $definition)
 
  904                                if($a_personal_data_only && !$definition[
"visible"])
 
  909                                if(!$user_defined_data[
"f_".$field])
 
  939                if( 
$ilSetting->get(
'usr_settings_hide_'.$setting) == 1 ||
 
  940                        $ilSetting->get(
'usr_settings_disable_'.$setting) == 1 )
 
  967                $ignorableSettings = array();
 
  969                foreach(self::$user_field as $field => $definition)
 
  972                        if( 
'username' == $field ||
 
  973                                'password' == $field )
 
  984                        if( self::isEditableByUser($field) )
 
  986                                $ignorableSettings[] = $field;
 
  990                return $ignorableSettings;
 
@classDescription Date and time handling
This class represents a non editable value in a property form.
_lookupRegisterAllowed()
get all roles that are activated in user registration
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
This class represents an option in a radio group.
Class ilObjAuthSettingsGUI.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _getInstance()
Get instance.
__construct()
Constructor.
addStandardFieldsToForm($a_form, $a_user=NULL, array $custom_fields=NULL)
Add standard fields to form.
getStandardFields()
Get standard user fields array.
getLocalUserAdministrationFields()
Get visible fields in local user administration.
skipField($a_field)
Skip a field.
skipGroup($a_group)
Skip a group.
static isEditableByUser($setting)
Returns whether a profile setting is editable by an user in the profile gui.
static userSettingVisible($a_setting)
Checks whether user setting is visible.
static getIgnorableRequiredSettings()
Returns an array of all ignorable profiel fields.
static isProfileIncomplete($a_user, $a_include_udf=true, $a_personal_data_only=true)
Check if all required personal data fields are set.
if(!is_array($argv)) $options