4 require_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
    5 include_once(
'./Services/Calendar/classes/class.ilDatePresentation.php');
 
   47         function ilObjUserGUI($a_data,$a_id,$a_call_by_reference = 
false, $a_prepare_output = 
true)
 
   51                 define(
'USER_FOLDER_ID',7);
 
   54                 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference, 
false);
 
   58                 $this->ctrl->saveParameter($this, array(
'obj_id', 
'letter'));
 
   59                 $this->ctrl->setParameterByClass(
"ilobjuserfoldergui", 
"letter", 
$_GET[
"letter"]);
 
   61                 $lng->loadLanguageModule(
'user');
 
   65                 $this->gender = array(
 
   66                                                           'm'    => 
"salutation_m",
 
   75                 $next_class = $this->ctrl->getNextClass($this);
 
   76                 $cmd = $this->ctrl->getCmd();
 
   82                         case "illearningprogressgui":
 
   83                                 include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
   85                                 $this->ctrl->forwardCommand($new_gui);
 
   88                         case "ilobjilincusergui":
 
   89                                 include_once 
'./Modules/ILinc/classes/class.ilObjiLincUserGUI.php';
 
   91                                 $this->ctrl->forwardCommand($new_gui);
 
   94                         case "ilobjectownershipmanagementgui":
 
   95                                 include_once(
"Services/Object/classes/class.ilObjectOwnershipManagementGUI.php");
 
   97                                 $this->ctrl->forwardCommand($gui);
 
  106                                 $return = $this->
$cmd();
 
  117                 if(strtolower(get_class($this->
object)) == 
'ilobjuser')
 
  119                         $this->tpl->setTitle(
'['.$this->object->getLogin().
'] '.$this->
object->getTitle());
 
  120                         $this->tpl->setDescription($this->object->getLongDescription());
 
  121                         $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.png"), $this->lng->txt(
"obj_" . $this->object->getType()));
 
  135                 if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  137                         $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  143                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  160                 global $rbacsystem, $ilHelp;
 
  162                 $tabs_gui->clearTargets();
 
  164                 $ilHelp->setScreenIdComponent(
"usr");
 
  168                         $tabs_gui->setBackTarget(
 
  169                                 $this->lng->txt(
"search_results"),
$_SESSION[
"usr_search_link"]);
 
  171                         $tabs_gui->addTarget(
"properties",
 
  172                                 $this->ctrl->getLinkTarget($this, 
"edit"), array(
"edit",
"",
"view"), get_class($this),
"",
true);
 
  176                         $tabs_gui->addTarget(
"properties",
 
  177                                 $this->ctrl->getLinkTarget($this, 
"edit"), array(
"edit",
"",
"view"), get_class($this));
 
  180                 $tabs_gui->addTarget(
"role_assignment",
 
  181                         $this->ctrl->getLinkTarget($this, 
"roleassignment"), array(
"roleassignment"), get_class($this));
 
  184                 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
 
  185                 if($rbacsystem->checkAccess(
'read',$this->ref_id) and 
 
  190                         $tabs_gui->addTarget(
'learning_progress',
 
  191                                                                  $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''),
 
  193                                                                  array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
 
  196                 if ($this->ilias->getSetting(
"ilinc_active"))
 
  198                         $tabs_gui->addTarget(
"extt_ilinc",
 
  199                         $this->ctrl->getLinkTargetByClass(
'ilobjilincusergui',
''),
 
  201                         array(
'ilobjilincusergui'));
 
  204                 $tabs_gui->addTarget(
'user_ownership',
 
  205                         $this->ctrl->getLinkTargetByClass(
'ilobjectownershipmanagementgui',
''),
 
  207                         'ilobjectownershipmanagementgui');
 
  215                 $this->back_target = array(
"text" => $a_text,
 
  225                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  228                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
  230                         if($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id]))
 
  241                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  244                 if($this->object->getType() == 
'usr')
 
  246                         $user_defined_data = $this->
object->getUserDefinedData();
 
  248                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
  250                         $old = isset(
$_SESSION[
"error_post_vars"][
"udf"][$field_id]) ?
 
  251                                 $_SESSION[
"error_post_vars"][
"udf"][$field_id] : $user_defined_data[$field_id];
 
  255                                 $this->tpl->setCurrentBlock(
"field_text");
 
  256                                 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
 
  258                                 $this->tpl->parseCurrentBlock();
 
  262                                 $this->tpl->setCurrentBlock(
"field_select");
 
  264                                                                                                                                                 'udf['.$definition[
'field_id'].
']',
 
  265                                                                                                                                                 $this->user_defined_fields->fieldValuesToSelectArray(
 
  266                                                                                                                                                         $definition[
'field_values']),
 
  269                                 $this->tpl->parseCurrentBlock();
 
  271                         $this->tpl->setCurrentBlock(
"user_defined");
 
  273                         if($definition[
'required'])
 
  275                                 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
 
  279                                 $name = $definition[
'field_name'];
 
  281                         $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
 
  282                         $this->tpl->parseCurrentBlock();
 
  293                         $this->tabs_gui->clearTargets();
 
  297                 $obj_list = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
 
  299                 foreach ($obj_list as $obj_data)
 
  302                         if($this->object->getRefId() != 
USER_FOLDER_ID and !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
 
  304                                 include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
  312                         if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
 
  315                                 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
 
  317                                         $rol[$obj_data[
"obj_id"]] = $obj_data[
"title"];
 
  325                         $this->ilias->raiseError($this->lng->txt(
"msg_no_roles_users_can_be_assigned_to"),$this->ilias->error_obj->MESSAGE);
 
  328                 $keys = array_keys($rol);
 
  331                 if (in_array(4,$keys))
 
  333                         $this->default_role = 4;
 
  337                         if (count($keys) > 1 and in_array(2,$keys))
 
  340                                 foreach ($keys as $key => $val)
 
  350                         $this->default_role = array_shift($keys);
 
  352                 $this->selectable_roles = $rol;
 
  362                 if (!$rbacsystem->checkAccess(
'create_usr', $this->usrf_ref_id) and
 
  363                         !$rbacsystem->checkAccess(
'cat_administrate_users',$this->usrf_ref_id))
 
  365                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  370                 return $tpl->setContent($this->form_gui->getHtml());
 
  381         include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  384                 if (!$ilAccess->checkAccess(
'create_usr', 
"", $this->usrf_ref_id) &&
 
  385                         !$ilAccess->checkAccess(
'cat_administrate_users', 
"", $this->usrf_ref_id))
 
  387                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  394                 $profileMaybeIncomplete = 
false;
 
  395                 if($this->form_gui->getInput(
'ignore_rf', 
false))
 
  400                 if ($this->form_gui->checkInput())
 
  407                         $userObj->setPasswd($this->form_gui->getInput(
'passwd'),
IL_PASSWD_PLAIN);
 
  408                         $userObj->setTitle($userObj->getFullname());
 
  409                         $userObj->setDescription($userObj->getEmail());
 
  412                         foreach(
$_POST as $k => $v)
 
  414                                 if (substr($k, 0, 4) == 
"udf_")
 
  416                                         $udf[substr($k, 4)] = $v;
 
  419                         $userObj->setUserDefinedData($udf);
 
  423                         include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  426                                 $userObj->setExternalAccount(
$_POST[
"ext_account"]);
 
  432                         $userObj->setLastPasswordChangeTS( time() );
 
  435                         $userObj->saveAsNew();
 
  440                                 $userObj->setLanguage(
$_POST[
"language"]);
 
  444                         require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
  454                                 $sknst = explode(
":", 
$_POST[
"skin_style"]);
 
  456                                 if ($userObj->getPref(
"style") != $sknst[1] ||
 
  457                                         $userObj->getPref(
"skin") != $sknst[0])
 
  459                                         $userObj->setPref(
"skin", $sknst[0]);
 
  460                                         $userObj->setPref(
"style", $sknst[1]);
 
  465                                 $userObj->setPref(
"hits_per_page", 
$_POST[
"hits_per_page"]);
 
  469                                 $userObj->setPref(
"show_users_online", 
$_POST[
"show_users_online"]);
 
  473                                 $userObj->setPref(
"hide_own_online_status", 
$_POST[
"hide_own_online_status"] ? 
'y' : 
'n');
 
  475                         if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
  477                                 $userObj->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
 
  479                         $userObj->writePrefs();
 
  482                         $rbacadmin->assignUser(
$_POST[
"default_role"],$userObj->getId(),
true);
 
  484                         $msg = $this->lng->txt(
"user_added");                   
 
  486                         $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
  487                         $ilUser->writePrefs();                        
 
  489                         $this->
object = $userObj;
 
  496                         if( $profileMaybeIncomplete )
 
  498                                 include_once 
'Services/User/classes/class.ilUserProfile.php';
 
  501                                         $this->
object->setProfileIncomplete( 
true );
 
  502                                         $this->
object->update();
 
  507                         if(
$_POST[
'send_mail'] == 
'y')
 
  509                                 include_once(
'Services/Mail/classes/class.ilAccountMail.php');
 
  511                                 $acc_mail->useLangVariablesAsFallback(
true);
 
  512                                 $acc_mail->setUserPassword(
$_POST[
'passwd']);
 
  513                                 $acc_mail->setUser($userObj);
 
  515                                 if ($acc_mail->send())
 
  517                                         $msg = $msg.
'<br />'.$this->lng->txt(
'mail_sent');
 
  522                                         $msg = $msg.
'<br />'.$this->lng->txt(
'mail_not_sent');
 
  532                         if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  534                                 $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  538                                 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  543                         $this->form_gui->setValuesByPost();
 
  544                         $tpl->setContent($this->form_gui->getHtml());
 
  555         global 
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, 
$ilUser 
  558                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  561         $settings = $ilias->getAllSettings();
 
  564                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
  566                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  573                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
  575                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  581                         $this->tabs_gui->clearTargets();
 
  587                 $this->tpl->setContent($this->form_gui->getHTML());
 
  613                 $user->setTimeLimitUntil($until->get(
IL_CAL_UNIX));
 
  615                 $user->setTimeLimitUnlimited($this->form_gui->getInput(
'time_limit_unlimited'));
 
  617                 if($a_mode == 
'create')
 
  619                         $user->setTimeLimitOwner($this->usrf_ref_id);
 
  625                         $bd = $this->form_gui->getInput(
'birthday');
 
  628                                 $user->setBirthday($bd[
'date']);
 
  632                                 $user->setBirthday(null);
 
  637                 $user->setLogin($this->form_gui->getInput(
'login'));
 
  643                         $user->setGender($this->form_gui->getInput(
'gender'));
 
  649                         $user->setUTitle($this->form_gui->getInput(
'title'));
 
  655                         $user->setFirstname($this->form_gui->getInput(
'firstname'));
 
  660                         $user->setLastname($this->form_gui->getInput(
'lastname'));
 
  662                 $user->setFullname();
 
  667                         $user->setInstitution($this->form_gui->getInput(
'institution'));
 
  673                         $user->setDepartment($this->form_gui->getInput(
'department'));
 
  678                         $user->setStreet($this->form_gui->getInput(
'street'));
 
  683                         $user->setCity($this->form_gui->getInput(
'city'));
 
  688                         $user->setZipcode($this->form_gui->getInput(
'zipcode'));
 
  693                         $user->setCountry($this->form_gui->getInput(
'country'));
 
  698                         $user->setSelectedCountry($this->form_gui->getInput(
'sel_country'));
 
  703                         $user->setPhoneOffice($this->form_gui->getInput(
'phone_office'));
 
  708                         $user->setPhoneHome($this->form_gui->getInput(
'phone_home'));
 
  713                         $user->setPhoneMobile($this->form_gui->getInput(
'phone_mobile'));
 
  718                         $user->setFax($this->form_gui->getInput(
'fax'));
 
  723                         $user->setMatriculation($this->form_gui->getInput(
'matriculation'));
 
  728                         $user->setEmail($this->form_gui->getInput(
'email'));
 
  733                         $user->setHobby($this->form_gui->getInput(
'hobby'));
 
  738                         $user->setComment($this->form_gui->getInput(
'referral_comment'));
 
  741                 $user->setClientIP($this->form_gui->getInput(
'client_ip'));
 
  745                         $user->setInstantMessengerId(
'icq', $this->form_gui->getInput(
'im_icq'));
 
  746                         $user->setInstantMessengerId(
'yahoo', $this->form_gui->getInput(
'im_yahoo'));
 
  747                         $user->setInstantMessengerId(
'msn', $this->form_gui->getInput(
'im_msn'));
 
  748                         $user->setInstantMessengerId(
'aim', $this->form_gui->getInput(
'im_aim'));
 
  749                         $user->setInstantMessengerId(
'skype', $this->form_gui->getInput(
'im_skype'));
 
  750                         $user->setInstantMessengerId(
'jabber', $this->form_gui->getInput(
'im_jabber'));
 
  751                         $user->setInstantMessengerId(
'voip', $this->form_gui->getInput(
'im_voip'));
 
  756                         $user->setDelicious($this->form_gui->getInput(
'delicious'));
 
  759                 $user->setLatitude($this->form_gui->getInput(
'latitude'));
 
  760                 $user->setLongitude($this->form_gui->getInput(
'longitude'));
 
  761                 $user->setLocationZoom($this->form_gui->getInput(
'loc_zoom'));
 
  764                 $user->setAuthMode($this->form_gui->getInput(
'auth_mode'));
 
  765                 $user->setExternalAccount($this->form_gui->getInput(
'ext_account'));
 
  767                 if((
int) $user->getActive() != (int) $this->form_gui->getInput(
'active'))
 
  769                         $user->setActive($this->form_gui->getInput(
'active'), $ilUser->getId());
 
  784                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
 
  786                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  793                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
  795                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  801                 unset(
$_POST[
'approve_date']);
 
  802                 $_POST[
'agree_date'] = $this->
object->getAgreeDate();
 
  803                 unset(
$_POST[
'last_login']);
 
  806                 $profileMaybeIncomplete = 
false;
 
  807                 if($this->form_gui->getInput(
'ignore_rf', 
false))
 
  812                 if ($this->form_gui->checkInput())
 
  817                                 && trim(
$_POST[
'passwd']) != 
"")
 
  823                         require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
  825                         if( $security_settings->getAccountSecurityMode() ==
 
  832                                 if( 
$_POST[
'active'] == 1 )
 
  837                         #$this->object->assignData($_POST); 
  841                         foreach(
$_POST as $k => $v)
 
  843                                 if (substr($k, 0, 4) == 
"udf_")
 
  845                                         $udf[substr($k, 4)] = $v;
 
  848                         $this->
object->setUserDefinedData($udf);
 
  852                                 $this->
object->updateLogin(
$_POST[
'login']);
 
  857                                 $this->form_gui->setValuesByPost();
 
  858                                 return $tpl->setContent($this->form_gui->getHtml());                            
 
  861                         $this->
object->setTitle($this->object->getFullname());
 
  862                         $this->
object->setDescription($this->object->getEmail());
 
  866                                 $this->
object->setLanguage($this->form_gui->getInput(
'language'));
 
  869                         require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
  879                                 $sknst = explode(
":", 
$_POST[
"skin_style"]);
 
  881                                 if ($this->object->getPref(
"style") != $sknst[1] ||
 
  882                                         $this->
object->getPref(
"skin") != $sknst[0])
 
  884                                         $this->
object->setPref(
"skin", $sknst[0]);
 
  885                                         $this->
object->setPref(
"style", $sknst[1]);
 
  890                                 $this->
object->setPref(
"hits_per_page", 
$_POST[
"hits_per_page"]);
 
  894                                 $this->
object->setPref(
"show_users_online", 
$_POST[
"show_users_online"]);
 
  898                                 $this->
object->setPref(
"hide_own_online_status", 
$_POST[
"hide_own_online_status"] ? 
'y' : 
'n');
 
  904                         $this->
object->setLastPasswordChangeTS( time() );
 
  907                         if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
  909                                 $this->
object->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
 
  913                         $this->
object->setProfileIncomplete( 
false );
 
  915                         $this->update = $this->
object->update();
 
  920                         if ($ilUser->getId() == $this->
object->getId()) 
 
  922                                 $ilUser->readPrefs();    
 
  924                         $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
  925                         $ilUser->writePrefs();
 
  928                         $msg = $this->lng->txt(
'saved_successfully').$mail_message;
 
  936                         if( $profileMaybeIncomplete )
 
  938                                 include_once 
'Services/User/classes/class.ilUserProfile.php';
 
  941                                         $this->
object->setProfileIncomplete( 
true );
 
  942                                         $this->
object->update();
 
  949                         if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  951                                 $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  955                                 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  960                         $this->form_gui->setValuesByPost();
 
  961                         $tpl->setContent($this->form_gui->getHtml());
 
  975                 $data[
"auth_mode"] = $this->
object->getAuthMode();
 
  976                 $data[
"login"] = $this->
object->getLogin();
 
  979                 $data[
"ext_account"] = $this->
object->getExternalAccount();
 
  982                 require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
  985                 $data[
"approve_date"] = ($this->
object->getApproveDate() != 
"")
 
  988                 $data[
"agree_date"] = ($this->
object->getAgreeDate() != 
"")
 
  991                 $data[
"last_login"] =  ($this->
object->getLastLogin() != 
"")
 
  994                 $data[
"active"] = $this->
object->getActive();
 
  995                 $data[
"time_limit_unlimited"] = $this->
object->getTimeLimitUnlimited();
 
  997                 $from = 
new ilDateTime($this->object->getTimeLimitFrom() ? $this->
object->getTimeLimitFrom() : time(),
IL_CAL_UNIX);
 
  998                 $data[
"time_limit_from"][
"date"] = $from->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
 
  999                 $data[
"time_limit_from"][
"time"] = $from->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
 
 1001                 $until = 
new ilDateTime($this->object->getTimeLimitUntil() ? $this->
object->getTimeLimitUntil() : time(),
IL_CAL_UNIX);
 
 1002                 $data[
'time_limit_until'][
'date'] = $until->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
 
 1003                 $data[
'time_limit_until'][
'time'] = $until->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
 
 1007                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
 1032                 $data[
"gender"] = $this->
object->getGender();
 
 1033                 $data[
"firstname"] = $this->
object->getFirstname();
 
 1034                 $data[
"lastname"] = $this->
object->getLastname();
 
 1035                 $data[
"title"] = $this->
object->getUTitle();
 
 1036                 $data[
'birthday'] = $this->
object->getBirthday();
 
 1037                 $data[
"institution"] = $this->
object->getInstitution();
 
 1038                 $data[
"department"] = $this->
object->getDepartment();
 
 1039                 $data[
"street"] = $this->
object->getStreet();
 
 1040                 $data[
"city"] = $this->
object->getCity();
 
 1041                 $data[
"zipcode"] = $this->
object->getZipcode();
 
 1042                 $data[
"country"] = $this->
object->getCountry();
 
 1043                 $data[
"sel_country"] = $this->
object->getSelectedCountry();
 
 1044                 $data[
"phone_office"] = $this->
object->getPhoneOffice();
 
 1045                 $data[
"phone_home"] = $this->
object->getPhoneHome();
 
 1046                 $data[
"phone_mobile"] = $this->
object->getPhoneMobile();
 
 1047                 $data[
"fax"] = $this->
object->getFax();
 
 1048                 $data[
"email"] = $this->
object->getEmail();
 
 1049                 $data[
"hobby"] = $this->
object->getHobby();
 
 1050                 $data[
"referral_comment"] = $this->
object->getComment();
 
 1053                 $data[
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
 
 1054                 $data[
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
 
 1055                 $data[
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
 
 1056                 $data[
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
 
 1057                 $data[
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
 
 1058                 $data[
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
 
 1059                 $data[
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
 
 1062                 $data[
"matriculation"] = $this->
object->getMatriculation();
 
 1063                 $data[
"delicious"] = $this->
object->getDelicious();
 
 1064                 $data[
"client_ip"] = $this->
object->getClientIP();
 
 1067                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
 1069                 $user_defined_data = $this->
object->getUserDefinedData();
 
 1070                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
 1072                         $data[
"udf_".$field_id] = $user_defined_data[
"f_".$field_id];
 
 1076                 $data[
"language"] = $this->
object->getLanguage();
 
 1077                 $data[
"skin_style"] = $this->
object->skin.
":".$this->
object->prefs[
"style"];
 
 1078                 $data[
"hits_per_page"] = $this->
object->prefs[
"hits_per_page"];
 
 1079                 $data[
"show_users_online"] = $this->
object->prefs[
"show_users_online"];
 
 1080                 $data[
"hide_own_online_status"] = $this->
object->prefs[
"hide_own_online_status"] == 
'y';
 
 1081                 $data[
"session_reminder_enabled"] = (int)$this->object->prefs[
"session_reminder_enabled"];
 
 1083                 $this->form_gui->setValuesByArray($data);
 
 1093                 $settings = $ilSetting->getAll();
 
 1095                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1098                 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
 
 1099                 if ($a_mode == 
"create")
 
 1101                         $this->form_gui->setTitle($lng->txt(
"usr_new"));
 
 1105                         $this->form_gui->setTitle($lng->txt(
"usr_edit"));
 
 1110                 $sec_l->setTitle($lng->txt(
"login_data"));
 
 1111                 $this->form_gui->addItem($sec_l);
 
 1114                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1118                 foreach ($active_auth_modes as $auth_name => $auth_key)
 
 1120                         if ($auth_name == 
'default')
 
 1126                                 $name = $this->lng->txt(
'auth_'.$auth_name);
 
 1128                         $option[$auth_name] = $name;
 
 1131                 $this->form_gui->addItem($am);
 
 1136                 if ($a_mode == 
"edit")
 
 1138                         $lo->setCurrentUserId($this->object->getId());
 
 1141                                 include_once 
'Services/Calendar/classes/class.ilDate.php';                              
 
 1146                                                 $this->lng->txt(
'usr_loginname_history_info'),
 
 1148                                                 $last_history_entry[0]
 
 1155                 $this->form_gui->addItem($lo);
 
 1163                         $pw->setMaxLength(32);
 
 1164                         $pw->setValidateAuthPost(
"auth_mode");
 
 1165                         if ($a_mode == 
"create")
 
 1167                                 $pw->setRequiredOnAuth(
true);
 
 1170                         $this->form_gui->addItem($pw);
 
 1175                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1178                         $ext = 
new ilTextInputGUI($lng->txt(
"user_ext_account"), 
"ext_account");
 
 1180                         $ext->setMaxLength(50);
 
 1181                         $ext->setInfo($lng->txt(
"user_ext_account_desc"));
 
 1182                         $this->form_gui->addItem($ext);
 
 1187                 $sec_si->setTitle($this->lng->txt(
"system_information"));
 
 1188                 $this->form_gui->addItem($sec_si);
 
 1191                 if ($a_mode == 
"edit")
 
 1193                         $sia = array(
"create_date", 
"approve_date", 
"agree_date", 
"last_login", 
"owner");
 
 1197                                 $this->form_gui->addItem($siai);
 
 1204                 $this->form_gui->addItem($ac);
 
 1207                 $lng->loadLanguageModule(
'crs');
 
 1212                         $op1 = 
new ilRadioOption($lng->txt(
"user_access_unlimited"), 1);
 
 1213                         $radg->addOption($op1);
 
 1214                         $op2 = 
new ilRadioOption($lng->txt(
"user_access_limited"), 0);
 
 1215                         $radg->addOption($op2);
 
 1225                 $op2->addSubItem($acfrom);
 
 1231                 $op2->addSubItem($acto);
 
 1234                 $this->form_gui->addItem($radg);
 
 1236                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
 1240                         $disk_quota = 
new ilTextInputGUI($lng->txt(
"disk_quota"), 
"disk_quota");
 
 1242                         $disk_quota->setMaxLength(11);
 
 1243                         $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
 
 1244                         $this->form_gui->addItem($disk_quota);
 
 1246                         if ($a_mode == 
"edit")
 
 1249                                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
 
 1251                                 if ($dq_info[
'user_disk_quota'] > $dq_info[
'role_disk_quota'])
 
 1253                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
 
 1256                                                 $dq_info[
'role_title']);
 
 1258                                 else if (is_infinite($dq_info[
'role_disk_quota']))
 
 1260                                         $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
 
 1264                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
 
 1266                                                 $dq_info[
'role_title']);
 
 1268                                 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
 
 1274                                 if ($du_info[
'last_update'] === null)
 
 1276                                         $disk_usage->
setValue($lng->txt(
'unknown'));
 
 1280                                 require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
 1284                                         foreach ($du_info[
'details'] as $detail_data)
 
 1287                                                         '<td>'.$detail_data[
'count'].
'</td>'.
 
 1288                                                         '<td>'.$lng->txt($detail_data[
'type']).
'</td>'.
 
 1289                                                         '<td>'.ilFormat::formatSize($detail_data[
'size'], 
'short').
'</td>'.
 
 1293                                         $info .= 
'</table>';
 
 1294                                         $info .= 
'<br>'.$this->lng->txt(
'last_update').
': '.
 
 1296                                         $disk_usage->setInfo($info);
 
 1299                                 $this->form_gui->addItem($disk_usage);
 
 1302                                 if (
true || $dq_info[
'last_reminder'])
 
 1308                                         $reminder->setInfo($this->lng->txt(
"disk_quota_last_reminder_sent_desc"));
 
 1309                                         $this->form_gui->addItem($reminder);
 
 1326                         $sec_pd->setTitle($this->lng->txt(
"personal_data"));
 
 1327                         $this->form_gui->addItem($sec_pd);
 
 1334                         $gndr->
setRequired(isset($settings[
"require_gender"]) && $settings[
"require_gender"]);
 
 1336                         $gndr->addOption($female);
 
 1338                         $gndr->addOption($male);
 
 1339                         $this->form_gui->addItem($gndr);
 
 1343                 $fields = array(
"firstname" => 
true, 
"lastname" => 
true,
 
 1344                         "title" => isset($settings[
"require_title"]) && $settings[
"require_title"]);
 
 1345                 foreach($fields as $field => $req)
 
 1351                                 $inp->setMaxLength(32);
 
 1352                                 $inp->setRequired($req);
 
 1353                                 $this->form_gui->addItem($inp);
 
 1361                         if ($a_mode == 
"edit" || $a_mode == 
"upload")
 
 1366                         $this->form_gui->addItem($pi);
 
 1372                         $birthday->
setRequired(isset($settings[
"require_birthday"]) && $settings[
"require_birthday"]);
 
 1373                         $birthday->setShowEmpty(
true);
 
 1374                         $birthday->setStartYear(1900);
 
 1375                         $this->form_gui->addItem($birthday);
 
 1382                         array(
"institution", 40, 80),
 
 1383                         array(
"department", 40, 80),
 
 1384                         array(
"street", 40, 40),
 
 1385                         array(
"city", 40, 40),
 
 1386                         array(
"zipcode", 10, 10),
 
 1387                         array(
"country", 40, 40),
 
 1388                         array(
"sel_country"),
 
 1389                         array(
"phone_office", 30, 30),
 
 1390                         array(
"phone_home", 30, 30),
 
 1391                         array(
"phone_mobile", 30, 30),
 
 1392                         array(
"fax", 30, 30));
 
 1395                 foreach ($fields as $field)
 
 1401                                 $sec_cd->setTitle($this->lng->txt(
"contact_data"));
 
 1402                                 $this->form_gui->addItem($sec_cd);
 
 1406                                 if ($field[0] != 
"sel_country")
 
 1410                                         $inp->setMaxLength($field[2]);
 
 1411                                         $inp->setRequired(isset($settings[
"require_".$field[0]]) &&
 
 1412                                                 $settings[
"require_".$field[0]]);
 
 1413                                         $this->form_gui->addItem($inp);
 
 1418                                         include_once(
"./Services/Form/classes/class.ilCountrySelectInputGUI.php");
 
 1420                                         $cs->
setRequired(isset($settings[
"require_".$field[0]]) &&
 
 1421                                                 $settings[
"require_".$field[0]]);
 
 1422                                         $this->form_gui->addItem($cs);
 
 1431                         $em->
setRequired(isset($settings[
"require_email"]) &&
 
 1432                                 $settings[
"require_email"]);
 
 1433                         $this->form_gui->addItem($em);
 
 1442                         $hob->setRequired(isset($settings[
"require_hobby"]) &&
 
 1443                                 $settings[
"require_hobby"]);
 
 1444                         $this->form_gui->addItem($hob);
 
 1453                         $rc->setRequired(isset($settings[
"require_referral_comment"]) &&
 
 1454                                 $settings[
"require_referral_comment"]);
 
 1455                         $this->form_gui->addItem($rc);
 
 1462                         $sec_im->setTitle($this->lng->txt(
"instant_messengers"));
 
 1463                         $this->form_gui->addItem($sec_im);
 
 1467                 $fields = array(
"icq", 
"yahoo", 
"msn", 
"aim", 
"skype", 
"jabber", 
"voip");
 
 1468                 foreach ($fields as $field)
 
 1474                                 $im->setMaxLength(40);
 
 1475                                 $this->form_gui->addItem($im);
 
 1483                         $sec_oi->setTitle($this->lng->txt(
"user_profile_other"));
 
 1484                         $this->form_gui->addItem($sec_oi);
 
 1490                         $mr = 
new ilTextInputGUI($lng->txt(
"matriculation"), 
"matriculation");
 
 1492                         $mr->setMaxLength(40);
 
 1493                         $mr->setRequired(isset($settings[
"require_matriculation"]) &&
 
 1494                                 $settings[
"require_matriculation"]);
 
 1495                         $this->form_gui->addItem($mr);
 
 1503                         $mr->setMaxLength(40);
 
 1504                         $mr->setRequired(isset($settings[
"require_delicious"]) &&
 
 1505                                 $settings[
"require_delicious"]);
 
 1506                         $this->form_gui->addItem($mr);
 
 1512                 $ip->setMaxLength(255);
 
 1513                 $ip->setInfo($this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
" <br />".
 
 1514                         '<span class="warning">'.$this->lng->txt(
"current_ip_alert").
"</span>");
 
 1515                 $this->form_gui->addItem($ip);
 
 1518                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
 1523                         $all_defs = $user_defined_fields->getDefinitions();
 
 1527                         $all_defs = $user_defined_fields->getChangeableLocalUserAdministrationDefinitions();
 
 1530                 foreach($all_defs as $field_id => $definition)
 
 1535                                         "udf_".$definition[
'field_id']);
 
 1537                                 $udf->setMaxLength(255);
 
 1542                                         "udf_".$definition[
'field_id']);
 
 1543                                 $udf->setUseRte(
true);
 
 1548                                         "udf_".$definition[
'field_id']);
 
 1549                                 $udf->setOptions($user_defined_fields->fieldValuesToSelectArray(
 
 1550                                                         $definition[
'field_values']));
 
 1552                         $udf->setRequired($definition[
'required']);
 
 1553                         $this->form_gui->addItem($udf);
 
 1558                         $a_mode == 
'create' or
 
 1566                         $sec_st->setTitle($this->lng->txt(
"settings"));
 
 1567                         $this->form_gui->addItem($sec_st);
 
 1571                 if ($a_mode == 
"create")
 
 1576                         $role->setValue($this->default_role);
 
 1577                         $role->setOptions($this->selectable_roles);
 
 1578                         $this->form_gui->addItem($role);
 
 1586                         $languages = $lng->getInstalledLanguages();
 
 1587                         $lng->loadLanguageModule(
"meta");
 
 1589                         foreach($languages as $l)
 
 1591                                 $options[$l] = $lng->txt(
"meta_l_".$l);
 
 1593                         $lang->setOptions($options);
 
 1594                         $lang->setValue($ilSetting->get(
"language"));
 
 1595                         $this->form_gui->addItem(
$lang);
 
 1603                         $templates = $styleDefinition->getAllTemplates();
 
 1605                         include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
 
 1608                         if (count($templates) > 0 && is_array ($templates))
 
 1610                                 foreach ($templates as $template)
 
 1613                                         $styleDef->startParsing();
 
 1614                                         $styles = $styleDef->getStyles();
 
 1615                                         foreach ($styles as $style)
 
 1621                                                 $options[$template[
"id"].
":".$style[
"id"]] =
 
 1622                                                         $styleDef->getTemplateName().
" / ".$style[
"name"];
 
 1626                         $sk->setOptions($options);
 
 1627                         $sk->setValue($ilClientIniFile->readVariable(
"layout",
"skin").
 
 1628                                 ":".$ilClientIniFile->readVariable(
"layout",
"style"));
 
 1630                         $this->form_gui->addItem($sk);
 
 1638                         $options = array(10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
 
 1639                                 50 => 50, 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
 
 1641                         $hpp->setValue($ilSetting->get(
"hits_per_page"));
 
 1642                         $this->form_gui->addItem($hpp);
 
 1646                                 'show_users_online');
 
 1648                                 "y" => $lng->txt(
"users_online_show_y"),
 
 1649                                 "associated" => $lng->txt(
"users_online_show_associated"),
 
 1650                                 "n" => $lng->txt(
"users_online_show_n"));
 
 1652                         $uo->setValue($ilSetting->get(
"show_users_online"));
 
 1653                         $this->form_gui->addItem($uo);
 
 1659                         $os = 
new ilCheckboxInputGUI($lng->txt(
"hide_own_online_status"), 
"hide_own_online_status");
 
 1660                         $this->form_gui->addItem($os);
 
 1667                         $sec_op->setTitle($this->lng->txt(
"options"));
 
 1668                         $this->form_gui->addItem($sec_op);
 
 1674                 $se->setChecked(($ilUser->getPref(
'send_info_mails') == 
'y'));
 
 1675                 $this->form_gui->addItem($se);
 
 1677                 if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
 1679                         $cb = 
new ilCheckboxInputGUI($this->lng->txt(
'session_reminder'), 
'session_reminder_enabled');
 
 1681                         $this->form_gui->addItem($cb);
 
 1686                 $irf->
setInfo($lng->txt(
'ignore_required_fields_info'));
 
 1688                 $this->form_gui->addItem($irf);
 
 1693                 if ($a_mode == 
"create" || $a_mode == 
"save")
 
 1695                         $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
 
 1697                 if ($a_mode == 
"edit" || $a_mode == 
"update")
 
 1699                         $this->form_gui->addCommandButton(
"update", $lng->txt(
"save"));
 
 1701                 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
 
 1717                 static $settings = null;
 
 1726                 if($settings == NULL)
 
 1728                         $settings = $ilSetting->getAll();
 
 1730                 return (
bool) $settings[
'usr_settings_changeable_lua_'.$a_field];
 
 1740         global 
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, 
$ilUser 
 1743                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1747         $settings = $ilias->getAllSettings();
 
 1750                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
 1752                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 1759                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 1761                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 1767                         $this->tabs_gui->clearTargets();
 
 1771                 $data[
"fields"] = array();
 
 1772                 $data[
"fields"][
"login"] = $this->
object->getLogin();
 
 1773                 $data[
"fields"][
"passwd"] = 
"********"; 
 
 1774                 #$data["fields"]["passwd2"] = "********";       // will not be saved 
 1775                 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
 
 1776                 $data[
"fields"][
"title"] = $this->
object->getUTitle();
 
 1777                 $data[
"fields"][
"gender"] = $this->
object->getGender();
 
 1778                 $data[
"fields"][
"firstname"] = $this->
object->getFirstname();
 
 1779                 $data[
"fields"][
"lastname"] = $this->
object->getLastname();
 
 1780                 $data[
"fields"][
"institution"] = $this->
object->getInstitution();
 
 1781                 $data[
"fields"][
"department"] = $this->
object->getDepartment();
 
 1782                 $data[
"fields"][
"street"] = $this->
object->getStreet();
 
 1783                 $data[
"fields"][
"city"] = $this->
object->getCity();
 
 1784                 $data[
"fields"][
"zipcode"] = $this->
object->getZipcode();
 
 1785                 $data[
"fields"][
"country"] = $this->
object->getCountry();
 
 1786                 $data[
"fields"][
"sel_country"] = $this->
object->getSelectedCountry();
 
 1787                 $data[
"fields"][
"phone_office"] = $this->
object->getPhoneOffice();
 
 1788                 $data[
"fields"][
"phone_home"] = $this->
object->getPhoneHome();
 
 1789                 $data[
"fields"][
"phone_mobile"] = $this->
object->getPhoneMobile();
 
 1790                 $data[
"fields"][
"fax"] = $this->
object->getFax();
 
 1791                 $data[
"fields"][
"email"] = $this->
object->getEmail();
 
 1792                 $data[
"fields"][
"hobby"] = $this->
object->getHobby();
 
 1793                 $data[
"fields"][
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
 
 1794                 $data[
"fields"][
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
 
 1795                 $data[
"fields"][
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
 
 1796                 $data[
"fields"][
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
 
 1797                 $data[
"fields"][
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
 
 1798                 $data[
"fields"][
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
 
 1799                 $data[
"fields"][
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
 
 1800                 $data[
"fields"][
"matriculation"] = $this->
object->getMatriculation();
 
 1801                 $data[
"fields"][
"client_ip"] = $this->
object->getClientIP();
 
 1802                 $data[
"fields"][
"referral_comment"] = $this->
object->getComment();
 
 1804                 $data[
"fields"][
"create_date"] = $this->
object->getCreateDate();
 
 1805                 $data[
"fields"][
"approve_date"] = $this->
object->getApproveDate();
 
 1806                 $data[
"fields"][
"agree_date"] = $this->
object->getAgreeDate();
 
 1807                 $data[
"fields"][
"last_login"] = $this->
object->getLastLogin();
 
 1808                 $data[
"fields"][
"active"] = $this->
object->getActive();
 
 1809                 $data[
"fields"][
"auth_mode"] = $this->
object->getAuthMode();
 
 1810                 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
 
 1813                 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"personal_picture"));
 
 1815                 $full_img = $this->
object->getPref(
"profile_image");
 
 1816                 $last_dot = strrpos($full_img, 
".");
 
 1817                 $small_img = substr($full_img, 0, $last_dot).
 
 1818                                 "_small".substr($full_img, $last_dot, strlen($full_img) - $last_dot);
 
 1819                 $image_file = $webspace_dir.
"/usr_images/".$small_img;
 
 1820                 if (@is_file($image_file))
 
 1822                         $this->tpl->setVariable(
"IMG_PERSONAL", $image_file.
"?dummy=".rand(1,99999));
 
 1823                         $this->tpl->setVariable(
"ALT_IMG_PERSONAL",$this->lng->txt(
"personal_picture"));
 
 1824                         $this->tpl->setVariable(
"TXT_REMOVE_PIC", $this->lng->txt(
"remove_personal_picture"));
 
 1827                 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
 
 1828                 $this->tpl->setVariable(
"TXT_FILE", $this->lng->txt(
"userfile"));
 
 1829                 $this->tpl->setVariable(
"USER_FILE", $this->lng->txt(
"user_file"));
 
 1854                         $user_is_online = 
false;
 
 1858                         $user_is_online = 
true;
 
 1861                         preg_match(
"/RoleId.*?;\}/",$user_online[$this->object->getId()][
"data"],$matches);
 
 1863                         $active_roles = unserialize(substr($matches[0],7));
 
 1866                         $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
 
 1868                         foreach ($assigned_roles as $key => $role)
 
 1870                                 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role);
 
 1873                                 $rolf = $rbacreview->getFoldersAssignedToRole($role,
true);
 
 1876                                 if (count($rolf) > 0)
 
 1878                                         if (!$rbacreview->isDeleted($rolf[0]))
 
 1882                                                 if ($this->tree->isInTree($rolf[0]))
 
 1884                                                         $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 1887                                                         for ($i = 0; $i < (count($tmpPath)-1); $i++)
 
 1894                                                                 $path .= $tmpPath[$i][
"title"];
 
 1899                                                         $path = 
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role.
")</b>";
 
 1901                                                 $active_roles = $active_roles ? $active_roles : array();
 
 1902                                                 if (in_array($role,$active_roles))
 
 1904                                                         $data[
"active_role"][$role][
"active"] = 
true;
 
 1907                                                 $data[
"active_role"][$role][
"title"] = $roleObj->getTitle();
 
 1908                                                 $data[
"active_role"][$role][
"context"] = 
$path;
 
 1915                                         $path = 
"<b>No role folder found for role ".$role.
"!</b>";
 
 1920                 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_edit.html',
'Services/User');
 
 1923                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"]))
 
 1925             if (!isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"]))
 
 1927                 $_SESSION[
"error_post_vars"][
"Fobject"][
"active"] = 0;
 
 1930                         foreach (
$_SESSION[
"error_post_vars"][
"Fobject"] as $key => $val)
 
 1932                                 $str = $this->lng->txt($key);
 
 1933                                 if ($key == 
"title")
 
 1935                                         $str = $this->lng->txt(
"person_title");
 
 1937                                 if($key == 
'passwd2')
 
 1941                                 if($key == 
'passwd')
 
 1946                                                 $this->tpl->setCurrentBlock(
'passwords_visible');
 
 1947                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 1948                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 1949                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd']);
 
 1950                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd2']);
 
 1951                                                 $this->tpl->parseCurrentBlock();
 
 1955                                                 $this->tpl->setCurrentBlock(
'passwords_invisible');
 
 1956                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 1957                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 1958                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
 
 1961                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
 
 1964                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
 
 1965                                                 $this->tpl->parseCurrentBlock();
 
 1972                 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
 
 1974                     $str = $str . 
'<span class="asterisk">*</span>';
 
 1977                                 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
 
 1979                                 if ($key != 
"default_role" and $key != 
"language" 
 1980                                         and $key != 
"skin_style" and $key != 
"hits_per_page" 
 1981                                         and $key != 
"show_users_online")
 
 1993                                 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
 
 1996             $active = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"];
 
 1999                 $this->tpl->setVariable(
"ACTIVE", 
"checked=\"checked\"");
 
 2004             if (!isset($data[
"fields"][
"active"]))
 
 2006                 $data[
"fields"][
"active"] = 0;
 
 2009                         foreach ($data[
"fields"] as $key => $val)
 
 2011                                 $str = $this->lng->txt($key);
 
 2012                                 if ($key == 
"title")
 
 2014                                         $str = $this->lng->txt(
"person_title");
 
 2016                                 if ($key == 
"ext_account")
 
 2020                                 if($key == 
'passwd')
 
 2022                                         $auth_mode = $this->
object->getAuthMode(
true);
 
 2025                                                 $this->tpl->setCurrentBlock(
'passwords_visible');
 
 2026                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2027                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2028                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD',
"********");
 
 2029                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
"********");
 
 2030                                                 $this->tpl->parseCurrentBlock();
 
 2034                                                 $this->tpl->setCurrentBlock(
'passwords_invisible');
 
 2035                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2036                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2037                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
 
 2040                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
 
 2043                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
 
 2044                                                 $this->tpl->parseCurrentBlock();
 
 2050                 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
 
 2052                     $str = $str . 
'<span class="asterisk">*</span>';
 
 2055                                 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
 
 2058                                 #$this->tpl->parseCurrentBlock(); 
 2062                         $gender = strtoupper($data[
"fields"][
"gender"]);
 
 2066                                 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
 
 2069                         $active = $data[
"fields"][
"active"];
 
 2072                                 $this->tpl->setVariable(
"ACTIVE", 
"checked=\"checked\"");
 
 2077                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2080                         $this->tpl->setCurrentBlock(
"ext_account");
 
 2081                         $this->tpl->setVariable(
"TXT_EXT_ACCOUNT",$this->lng->txt(
"user_ext_account"));
 
 2082                         $this->tpl->setVariable(
"TXT_EXT_ACCOUNT_DESC",$this->lng->txt(
"user_ext_account_desc"));
 
 2083                         if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]))
 
 2085                                 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
 
 2086                                         $_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]);
 
 2090                                 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
 
 2091                                         $data[
"fields"][
"ext_account"]);
 
 2102                         $this->tpl->parseCurrentBlock();
 
 2104                 $auth_mode = 
$_SESSION[
'error_post_vars'][
'Fobject'][
'auth_mode'] ?
 
 2106                         $this->
object->getAuthMode(
true);
 
 2109                         $this->tpl->setVariable(
"OPTION_DISABLED", 
"\"disabled=disabled\"");
 
 2111                 $obj_str = ($this->call_by_reference) ? 
"" : 
"&obj_id=".$this->obj_id;
 
 2113                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 2114                 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
 
 2115                 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 2116                 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
 2117                 $this->tpl->setVariable(
"CMD_SUBMIT", 
"update");
 
 2118                 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
 
 2119                 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
 
 2121                 $this->tpl->setVariable(
"TXT_LOGIN_DATA", $this->lng->txt(
"login_data"));
 
 2122         $this->tpl->setVariable(
"TXT_SYSTEM_INFO", $this->lng->txt(
"system_information"));
 
 2123                 $this->tpl->setVariable(
"TXT_PERSONAL_DATA", $this->lng->txt(
"personal_data"));
 
 2124                 $this->tpl->setVariable(
"TXT_CONTACT_DATA", $this->lng->txt(
"contact_data"));
 
 2125                 $this->tpl->setVariable(
"TXT_SETTINGS", $this->lng->txt(
"settings"));
 
 2126                 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
"language"));
 
 2127                 $this->tpl->setVariable(
"TXT_SKIN_STYLE",$this->lng->txt(
"usr_skin_style"));
 
 2128                 $this->tpl->setVariable(
"TXT_HITS_PER_PAGE",$this->lng->txt(
"hits_per_page"));
 
 2129                 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE",$this->lng->txt(
"show_users_online"));
 
 2130                 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
 
 2131                 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
 
 2132                 $this->tpl->setVariable(
"TXT_INSTANT_MESSENGERS",$this->lng->txt(
"user_profile_instant_messengers"));
 
 2133                 $this->tpl->setVariable(
"TXT_OTHER",$this->lng->txt(
"user_profile_other"));
 
 2134                 if ($this->object->getId() == $ilUser->getId())
 
 2136                         $this->tpl->setVariable(
"TXT_CURRENT_IP",
"(".$this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
")");
 
 2138                 $this->tpl->setVariable(
"TXT_CURRENT_IP_ALERT",$this->lng->txt(
"current_ip_alert"));
 
 2141                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2145                 $selected_auth_mode = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"])) ? 
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"] : $this->object->getAuthMode();
 
 2147                 foreach ($active_auth_modes as $auth_name => $auth_key)
 
 2149                         $this->tpl->setCurrentBlock(
"auth_mode_selection");
 
 2151                         if ($auth_name == 
'default')
 
 2157                                 $name = $this->lng->txt(
'auth_'.$auth_name);
 
 2160                         $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
 
 2162                         $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
 
 2164                         if ($selected_auth_mode == $auth_name)
 
 2166                                 $this->tpl->setVariable(
"SELECTED_AUTH_MODE", 
"selected=\"selected\"");
 
 2169                         $this->tpl->parseCurrentBlock();
 
 2174                 $languages = $this->lng->getInstalledLanguages();
 
 2177                 $selected_lang = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"])) ? 
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"] : $this->object->getLanguage();
 
 2179                 foreach ($languages as $lang_key)
 
 2181                         $this->tpl->setCurrentBlock(
"language_selection");
 
 2182                         $this->tpl->setVariable(
"LANG", $this->lng->txt(
"lang_".$lang_key));
 
 2183                         $this->tpl->setVariable(
"LANGSHORT", $lang_key);
 
 2185                         if ($selected_lang == $lang_key)
 
 2187                                 $this->tpl->setVariable(
"SELECTED_LANG", 
"selected=\"selected\"");
 
 2190                         $this->tpl->parseCurrentBlock();
 
 2195                 $templates = $styleDefinition->getAllTemplates();
 
 2198                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]))
 
 2200                         $sknst = explode(
":", 
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]);
 
 2202                         $selected_style = $sknst[1];
 
 2203                         $selected_skin = $sknst[0];
 
 2207                         $selected_style = $this->
object->prefs[
"style"];
 
 2208                         $selected_skin = $this->
object->skin;
 
 2211                 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
 
 2212                 if (count($templates) > 0 && is_array ($templates))
 
 2214                         foreach ($templates as $template)
 
 2219                                 $styleDef->startParsing();
 
 2220                                 $styles = $styleDef->getStyles();
 
 2221                                 foreach ($styles as $style)
 
 2228                                         $this->tpl->setCurrentBlock(
"selectskin");
 
 2230                                         if ($selected_skin == $template[
"id"] &&
 
 2231                                                 $selected_style == $style[
"id"])
 
 2233                                                 $this->tpl->setVariable(
"SKINSELECTED", 
"selected=\"selected\"");
 
 2236                                         $this->tpl->setVariable(
"SKINVALUE", $template[
"id"].
":".$style[
"id"]);
 
 2237                                         $this->tpl->setVariable(
"SKINOPTION", $styleDef->getTemplateName().
" / ".$style[
"name"]);
 
 2238                                         $this->tpl->parseCurrentBlock();
 
 2243                 $hits_options = array(2,10,15,20,30,40,50,100,9999);
 
 2245                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"]))
 
 2247                         $selected_option = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"];
 
 2251                         $selected_option = $this->
object->prefs[
"hits_per_page"];
 
 2253                 foreach($hits_options as $hits_option)
 
 2255                         $this->tpl->setCurrentBlock(
"selecthits");
 
 2257                         if ($selected_option == $hits_option)
 
 2259                                 $this->tpl->setVariable(
"HITSSELECTED", 
"selected=\"selected\"");
 
 2262                         $this->tpl->setVariable(
"HITSVALUE", $hits_option);
 
 2264                         if ($hits_option == 9999)
 
 2266                                 $hits_option = $this->lng->txt(
"no_limit");
 
 2269                         $this->tpl->setVariable(
"HITSOPTION", $hits_option);
 
 2270                         $this->tpl->parseCurrentBlock();
 
 2275                 $users_online_options = array(
"y",
"associated",
"n");
 
 2277                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"]))
 
 2279                         $selected_option = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"];
 
 2283                         $selected_option = $this->
object->prefs[
"show_users_online"];
 
 2285                 foreach($users_online_options as $an_option)
 
 2287                         $this->tpl->setCurrentBlock(
"show_users_online");
 
 2289                         if ($selected_option == $an_option)
 
 2291                                 $this->tpl->setVariable(
"USERS_ONLINE_SELECTED", 
"selected=\"selected\"");
 
 2294                         $this->tpl->setVariable(
"USERS_ONLINE_VALUE", $an_option);
 
 2296                         $this->tpl->setVariable(
"USERS_ONLINE_OPTION", $this->lng->txt(
"users_online_show_".$an_option));
 
 2297                         $this->tpl->parseCurrentBlock();
 
 2302                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"]))
 
 2304                         $hide_own_online_status = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"];
 
 2308                         $hide_own_online_status = ($this->
object->prefs[
"hide_own_online_status"] != 
'') ? $this->object->prefs[
"hide_own_online_status"] : 
"n";
 
 2310                 $this->tpl->setCurrentBlock(
"hide_own_online_status");
 
 2311                 $this->tpl->setVariable(
"TXT_HIDE_OWN_ONLINE_STATUS", $this->lng->txt(
"hide_own_online_status"));
 
 2312                 if ($hide_own_online_status == 
"y") {
 
 2313                         $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS", 
"checked=\"checked\"");
 
 2316                         $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS", 
"");
 
 2318                 $this->tpl->parseCurrentBlock();
 
 2322                 $this->tpl->setCurrentBlock(
"inform_user");
 
 2325                 $sendInfoMail = $ilUser->getPref(
'send_info_mails') == 
'y';
 
 2329                         $this->tpl->setVariable(
"SEND_MAIL", 
" checked=\"checked\"");
 
 2332                 $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL", $this->lng->txt(
"inform_user_mail"));
 
 2333                 $this->tpl->parseCurrentBlock();
 
 2335                 $this->lng->loadLanguageModule(
'crs');
 
 2337                 $time_limit_unlimited = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] ?
 
 2338             $_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] :
 
 2339             $this->
object->getTimeLimitUnlimited();
 
 2340         $time_limit_from = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"from"] ?
 
 2342             $this->
object->getTimeLimitFrom();
 
 2344         $time_limit_until = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"until"] ?
 
 2346             $this->
object->getTimeLimitUntil();
 
 2348                 $this->tpl->setCurrentBlock(
"time_limit");
 
 2349         $this->tpl->setVariable(
"TXT_TIME_LIMIT", $this->lng->txt(
"time_limit"));
 
 2350         $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNLIMITED", $this->lng->txt(
"crs_unlimited"));
 
 2351         $this->tpl->setVariable(
"TXT_TIME_LIMIT_FROM", $this->lng->txt(
"crs_from"));
 
 2352         $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNTIL", $this->lng->txt(
"crs_to"));
 
 2354         $this->tpl->setVariable(
"TIME_LIMIT_UNLIMITED",
ilUtil::formCheckbox($time_limit_unlimited,
"time_limit[unlimited]",1));
 
 2355         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[from][minute]",
 
 2356                                                                                      date(
"i",$time_limit_from)));
 
 2357         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[from][hour]",
 
 2358                                                                                      date(
"G",$time_limit_from)));
 
 2359         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_DAY",$this->
__getDateSelect(
"day",
"time_limit[from][day]",
 
 2360                                                                                      date(
"d",$time_limit_from)));
 
 2361         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MONTH",$this->
__getDateSelect(
"month",
"time_limit[from][month]",
 
 2362                                                                                        date(
"m",$time_limit_from)));
 
 2363         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_YEAR",$this->
__getDateSelect(
"year",
"time_limit[from][year]",
 
 2364                                                                                       date(
"Y",$time_limit_from)));
 
 2365         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[until][minute]",
 
 2366                                                                                      date(
"i",$time_limit_until)));
 
 2367         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[until][hour]",
 
 2368                                                                                      date(
"G",$time_limit_until)));
 
 2369         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_DAY",$this->
__getDateSelect(
"day",
"time_limit[until][day]",
 
 2370                                                                                    date(
"d",$time_limit_until)));
 
 2371         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MONTH",$this->
__getDateSelect(
"month",
"time_limit[until][month]",
 
 2372                                                                                      date(
"m",$time_limit_until)));
 
 2373         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_YEAR",$this->
__getDateSelect(
"year",
"time_limit[until][year]",
 
 2374                                                                                     date(
"Y",$time_limit_until)));
 
 2375                 $this->tpl->parseCurrentBlock();
 
 2392                         !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
 2394                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2401                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 2403                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2407                 $userfile_input = $this->form_gui->getItemByPostVar(
"userfile");
 
 2409                 if ($_FILES[
"userfile"][
"tmp_name"] == 
"")
 
 2411                         if ($userfile_input->getDeletionFlag())
 
 2413                                 $this->
object->removeUserPicture();
 
 2417                 if ($_FILES[
"userfile"][
"size"] == 0)
 
 2424                         $image_dir = $webspace_dir.
"/usr_images";
 
 2425                         $store_file = 
"usr_".$this->object->getId().
".".
"jpg";
 
 2428                         $this->
object->setPref(
"profile_image", $store_file);
 
 2429                         $this->
object->update();
 
 2432                         $uploaded_file = $image_dir.
"/upload_".$this->
object->getId().
"pic";
 
 2434                                 $uploaded_file, 
false))
 
 2437                                 $this->ctrl->redirect($this, 
"showProfile");
 
 2439                         chmod($uploaded_file, 0770);
 
 2443                         $show_file  = 
"$image_dir/usr_".$this->object->getId().
".jpg";
 
 2444                         $thumb_file = 
"$image_dir/usr_".$this->object->getId().
"_small.jpg";
 
 2445                         $xthumb_file = 
"$image_dir/usr_".$this->object->getId().
"_xsmall.jpg";
 
 2446                         $xxthumb_file = 
"$image_dir/usr_".$this->object->getId().
"_xxsmall.jpg";
 
 2455                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:".$show_file);
 
 2456                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:".$thumb_file);
 
 2457                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:".$xthumb_file);
 
 2458                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:".$xxthumb_file);
 
 2462                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
 
 2463                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
 
 2464                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
 
 2465                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
 
 2476                 $image_dir = $webspace_dir.
"/usr_images";
 
 2477                 $file = $image_dir.
"/usr_".$this->
object->getID().
".".
"jpg";
 
 2478                 $thumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_small.jpg";
 
 2479                 $xthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xsmall.jpg";
 
 2480                 $xxthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xxsmall.jpg";
 
 2481                 $upload_file = $image_dir.
"/upload_".$this->
object->getID();
 
 2484                 $this->
object->setPref(
"profile_image", 
"");
 
 2485                 $this->
object->update();
 
 2488                 if (@is_file(
$file))
 
 2492                 if (@is_file($thumb_file))
 
 2494                         unlink($thumb_file);
 
 2496                 if (@is_file($xthumb_file))
 
 2498                         unlink($xthumb_file);
 
 2500                 if (@is_file($xxthumb_file))
 
 2502                         unlink($xxthumb_file);
 
 2504                 if (@is_file($upload_file))
 
 2506                         unlink($upload_file);
 
 2752                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2755         $settings = $ilias->getAllSettings();
 
 2758                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
 
 2760                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2767                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 2769                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2773                 foreach (
$_POST[
"Fobject"] as $key => $val)
 
 2779         foreach ($settings as $key => $val)
 
 2781             $field = substr($key,8);
 
 2788                                $require_keys[] = $field;
 
 2792                         $require_keys[] = $field;
 
 2798         foreach ($require_keys as $key => $val)
 
 2801             $system_fields = array(
"default_role");
 
 2802             if (!in_array($val, $system_fields))
 
 2804                 if (isset($settings[
"require_" . $val]) && $settings[
"require_" . $val])
 
 2806                     if (empty(
$_POST[
"Fobject"][$val]))
 
 2808                         $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") . 
": " .
 
 2809                                                                                                  $this->lng->txt($val),$this->ilias->error_obj->MESSAGE);
 
 2817                         $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
 2820                 if ($this->object->getLogin() != 
$_POST[
"Fobject"][
"login"] &&
 
 2823                         $this->ilias->raiseError($this->lng->txt(
"login_invalid"),$this->ilias->error_obj->MESSAGE);
 
 2829                         $this->ilias->raiseError($this->lng->txt(
"login_exists"),$this->ilias->error_obj->MESSAGE);
 
 2834                         if(
$_POST[
'Fobject'][
'passwd'] == 
"********" and
 
 2835                                 !strlen($this->object->getPasswd()))
 
 2837                 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") . 
": " .
 
 2838                                         $this->lng->txt(
'password'),$this->ilias->error_obj->MESSAGE);
 
 2841                         if (
$_POST[
"Fobject"][
"passwd"] != 
$_POST[
"Fobject"][
"passwd2"])
 
 2843                                 $this->ilias->raiseError($this->lng->txt(
"passwd_not_match"),$this->ilias->error_obj->MESSAGE);
 
 2849                                 $this->ilias->raiseError($this->lng->txt(
"passwd_invalid"),$this->ilias->error_obj->MESSAGE);
 
 2855                         $_POST[
'Fobject'][
'passwd'] = 
"********";
 
 2859                         if(!strlen(
$_POST[
'Fobject'][
'ext_account']))
 
 2861                                 $this->ilias->raiseError($this->lng->txt(
'ext_acccount_required'),$this->ilias->error_obj->MESSAGE);
 
 2864                 if(
$_POST[
'Fobject'][
'ext_account'] &&
 
 2867                         if($elogin != $this->object->getLogin())
 
 2869                                 $this->ilias->raiseError(
 
 2870                                                 sprintf($this->lng->txt(
"err_auth_ext_user_exists"),
 
 2871                                                         $_POST[
"Fobject"][
"ext_account"],
 
 2872                                                         $_POST[
'Fobject'][
'auth_mode'],
 
 2874                                                 $this->ilias->error_obj->MESSAGE);
 
 2880                 include_once (
'./Services/User/classes/class.ilObjUser.php');
 
 2886                         $this->ilias->raiseError($this->lng->txt(
"email_not_valid"),$this->ilias->error_obj->MESSAGE);
 
 2893                 if (!
$_POST[
"time_limit"][
"unlimited"] and
 
 2896             $this->ilias->raiseError($this->lng->txt(
"time_limit_not_valid"),$this->ilias->error_obj->MESSAGE);
 
 2899                 if(!$this->ilias->account->getTimeLimitUnlimited())
 
 2901                         if($start < $this->ilias->account->getTimeLimitFrom() or
 
 2902                            $end > $this->ilias->account->getTimeLimitUntil() or
 
 2903                            $_POST[
'time_limit'][
'unlimited'])
 
 2917                 $_POST[
'Fobject'][
'time_limit_owner'] = $this->
object->getTimeLimitOwner();
 
 2919                 $_POST[
'Fobject'][
'time_limit_unlimited'] = (int) 
$_POST[
'time_limit'][
'unlimited'];
 
 2923                 if(
$_POST[
'Fobject'][
'time_limit_unlimited'] != $this->object->getTimeLimitUnlimited() or
 
 2924                    $_POST[
'Fobject'][
'time_limit_from'] != $this->
object->getTimeLimitFrom() or
 
 2925                    $_POST[
'Fobject'][
'time_limit_until'] != $this->
object->getTimeLimitUntil())
 
 2927                         $_POST[
'Fobject'][
'time_limit_message'] = 0;
 
 2931                         $_POST[
'Fobject'][
'time_limit_message'] = $this->
object->getTimeLimitMessage();
 
 2934                 $this->
object->assignData(
$_POST[
"Fobject"]);
 
 2935                 $this->
object->setUserDefinedData(
$_POST[
'udf']);
 
 2939                         $this->
object->updateLogin(
$_POST[
'Fobject'][
'login']);
 
 2944                         $this->form_gui->setValuesByPost();
 
 2945                         return $tpl->setContent($this->form_gui->getHtml());                            
 
 2948                 $this->
object->setTitle($this->object->getFullname());
 
 2949                 $this->
object->setDescription($this->object->getEmail());
 
 2950                 $this->
object->setLanguage(
$_POST[
"Fobject"][
"language"]);
 
 2953                 $sknst = explode(
":", 
$_POST[
"Fobject"][
"skin_style"]);
 
 2955                 if ($this->object->getPref(
"style") != $sknst[1] ||
 
 2956                         $this->
object->getPref(
"skin") != $sknst[0])
 
 2958                         $this->
object->setPref(
"skin", $sknst[0]);
 
 2959                         $this->
object->setPref(
"style", $sknst[1]);
 
 2963                 $this->
object->setPref(
"hits_per_page", 
$_POST[
"Fobject"][
"hits_per_page"]);
 
 2965                 $this->
object->setPref(
"show_users_online", 
$_POST[
"Fobject"][
"show_users_online"]);
 
 2967                 if (
$_POST[
"Fobject"][
"hide_own_online_status"]) {
 
 2968                         $this->
object->setPref(
"hide_own_online_status", 
$_POST[
"Fobject"][
"hide_own_online_status"]);
 
 2971                         $this->
object->setPref(
"hide_own_online_status", 
"n");
 
 2974                 $this->update = $this->
object->update();
 
 2979                 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
 2980                 $ilUser->writePrefs();
 
 2984                 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
 
 2989                 if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
 2991                         $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
 2995                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
 3008                 global $rbacsystem, $rbacadmin, $rbacreview;
 
 3010                 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
 
 3012                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
 
 3015                 $selected_roles = 
$_POST[
"role_id"] ? 
$_POST[
"role_id"] : array();
 
 3016                 $posted_roles = 
$_POST[
"role_id_ctrl"] ? 
$_POST[
"role_id_ctrl"] : array();
 
 3019                 if ($this->object->getId() == SYSTEM_USER_ID and in_array(SYSTEM_ROLE_ID, $posted_roles))
 
 3021                         array_push($selected_roles,SYSTEM_ROLE_ID);
 
 3024                 $global_roles_all = $rbacreview->getGlobalRoles();
 
 3025                 $assigned_roles_all = $rbacreview->assignedRoles($this->object->getId());
 
 3026                 $assigned_roles = array_intersect($assigned_roles_all,$posted_roles);
 
 3027                 $assigned_global_roles_all = array_intersect($assigned_roles_all,$global_roles_all);
 
 3028                 $assigned_global_roles = array_intersect($assigned_global_roles_all,$posted_roles);
 
 3029                 $posted_global_roles = array_intersect($selected_roles,$global_roles_all);
 
 3031                 if ((empty($selected_roles) and count($assigned_roles_all) == count($assigned_roles))
 
 3032                          or (empty($posted_global_roles) and count($assigned_global_roles_all) == count($assigned_global_roles)))
 
 3036             ilUtil::sendFailure($this->lng->txt(
"msg_min_one_role").
"<br/>".$this->lng->txt(
"action_aborted"),
true);
 
 3037             $this->ctrl->redirect($this,
'roleassignment');
 
 3040                 foreach (array_diff($assigned_roles,$selected_roles) as $role)
 
 3042                         $rbacadmin->deassignUser($role,$this->object->getId());
 
 3045                 foreach (array_diff($selected_roles,$assigned_roles) as $role)
 
 3047                         $rbacadmin->assignUser($role,$this->object->getId(),
false);
 
 3050         include_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
 3053                 $this->
object->update();
 
 3057                 if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
 3059                         $this->ctrl->redirect($this,
'roleassignment');
 
 3063                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
 3075                 global $rbacreview,$rbacsystem,
$ilUser, $ilTabs;
 
 3077                 $ilTabs->activateTab(
"role_assignment");
 
 3079                 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
 
 3081                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
 
 3091                 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_role_assignment.html',
'Services/User');
 
 3095                         $this->tpl->setCurrentBlock(
"filter");
 
 3096                         $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
 
 3098                         $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this));
 
 3099                         $this->tpl->setVariable(
"FILTER_NAME",
'roleassignment');
 
 3100                         $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
 
 3101                         $this->tpl->parseCurrentBlock();
 
 3105                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3109                 $role_list = $rbacreview->getRolesByFilter(
$tab->filter[
"role_filter"],$this->object->getId());
 
 3110                 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
 
 3114         include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
 
 3117                 foreach ($role_list as $role)
 
 3120                         $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
 
 3123                         if ($rbacreview->isDeleted($rolf[0]))
 
 3131                         if ($this->tree->isInTree($rolf[0]))
 
 3133                 if ($rolf[0] == ROLE_FOLDER_ID)
 
 3135                     $path = $this->lng->txt(
"global");
 
 3139                                     $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 3152                                     $path = $tmpPath[count($tmpPath)-2][
"title"];
 
 3157                                 $path = 
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role[
"obj_id"].
")</b>";
 
 3163                         if (($this->object->getId() == SYSTEM_USER_ID and $role[
"obj_id"] == SYSTEM_ROLE_ID)
 
 3164                                 or (!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())) and $role[
"obj_id"] == SYSTEM_ROLE_ID))
 
 3170                         if($role[
'obj_id'] == SYSTEM_ROLE_ID && !$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
 
 3172                                 include_once 
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
 
 3179             if (substr($role[
"title"],0,3) == 
"il_")
 
 3183                         $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
 
 3184                         $rolf2 = $rolf_arr[0];
 
 3191                                 $parent_node = $this->tree->getParentNodeData($rolf2);
 
 3193                                 $role[
"description"] = $this->lng->txt(
"obj_".$parent_node[
"type"]).
" (#".$parent_node[
"obj_id"].
")";
 
 3196                         $role_ids[$counter] = $role[
"obj_id"];
 
 3198             $result_set[$counter][] = $checkbox = ilUtil::formCheckBox(in_array($role[
"obj_id"],$assigned_roles),
"role_id[]",$role[
"obj_id"],$disabled).
"<input type=\"hidden\" name=\"role_id_ctrl[]\" value=\"".$role[
"obj_id"].
"\"/>";
 
 3199                         $this->ctrl->setParameterByClass(
"ilobjrolegui", 
"ref_id", $rolf[0]);
 
 3200                         $this->ctrl->setParameterByClass(
"ilobjrolegui", 
"obj_id", $role[
"obj_id"]);
 
 3201                         $result_set[$counter][] = $link = 
"<a href=\"".$this->ctrl->getLinkTargetByClass(
"ilobjrolegui", 
"perm").
"\">".
ilObjRole::_getTranslation($role[
"title"]).
"</a>";
 
 3203             $result_set[$counter][] = $role[
"description"];
 
 3206                 if ($role[
"role_type"] == 
"local") {
 
 3214                         foreach ($ref_ids as 
$ref_id) {}
 
 3216                         require_once(
"./Services/Link/classes/class.ilLink.php");
 
 3222                                 $result_set[$counter][] = 
$path;
 
 3226                         $records[] = array(
"path" => 
$path, 
"description" => $role[
"description"],
 
 3227                                 "context" => $context, 
"checkbox" => $checkbox,
 
 3228                                 "role" => $link, 
"title" => 
$title);
 
 3234                         $tab->setData($records);
 
 3235                         $this->tpl->setVariable(
"ROLES_TABLE",
$tab->getHTML());
 
 3247                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3249                 $table_gui->writeFilterToSession();        
 
 3250                 $table_gui->resetOffset();                
 
 3259                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3261                 $table_gui->resetOffset();                
 
 3262                 $table_gui->resetFilter();                
 
 3271                 for($i=0;$i<=60;$i++)
 
 3273                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3278                 for($i=0;$i<24;$i++)
 
 3280                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3285                 for($i=1;$i<32;$i++)
 
 3287                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3292                 for($i=1;$i<13;$i++)
 
 3294                     $month[$i] = $i < 10 ? 
"0".$i : $i;
 
 3299                                 if($a_selected < date(
'Y',time()))
 
 3301                                         $start = $a_selected;
 
 3305                                         $start = date(
'Y',time());
 
 3308                 for($i = $start;$i < date(
"Y",time()) + 11;++$i)
 
 3318         return mktime($a_time_arr[
"hour"],
 
 3319                       $a_time_arr[
"minute"],
 
 3320                       $a_time_arr[
"second"],
 
 3321                       $a_time_arr[
"month"],
 
 3323                       $a_time_arr[
"year"]);
 
 3330                 $actions = array(
"assignSave"  => $this->lng->txt(
"change_assignment"));
 
 3333                 $tpl =& $tbl->getTemplateObject();
 
 3335                 $tpl->setCurrentBlock(
"tbl_form_header");
 
 3336                 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 3337                 $tpl->parseCurrentBlock();
 
 3339                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 3341                         $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 3344             foreach (
$actions as $name => $value)
 
 3346                                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3347                                 $tpl->setVariable(
"BTN_NAME",$name);
 
 3348                                 $tpl->setVariable(
"BTN_VALUE",$value);
 
 3349                                 $tpl->parseCurrentBlock();
 
 3352                         if (!empty($a_role_ids))
 
 3355                                 $tpl->setCurrentBlock(
"tbl_action_toggle_checkboxes");
 
 3356                                 $tpl->setVariable(
"JS_VARNAME",
"role_id");
 
 3358                                 $tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
 
 3359                                 $tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
 
 3360                                 $tpl->parseCurrentBlock();
 
 3363             $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 3366                 $this->ctrl->setParameter($this,
"cmd",
"roleassignment");
 
 3369                 $tbl->setTitle($this->lng->txt(
"edit_roleassignment"),
"icon_role.png",$this->lng->txt(
"roles"));
 
 3372                 $tbl->setHeaderNames(array(
"",$this->lng->txt(
"role"),$this->lng->txt(
"description"),$this->lng->txt(
"context")));
 
 3373                 $tbl->setHeaderVars(array(
"",
"title",
"description",
"context"),$this->ctrl->getParameterArray($this,
"",
false));
 
 3374                 $tbl->setColumnWidth(array(
"",
"30%",
"40%",
"30%"));
 
 3378                 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
 
 3385                 include_once 
"./Services/Table/classes/class.ilTableGUI.php";
 
 3395                         $order = 
$_GET[
"sort_by"] ? 
$_GET[
"sort_by"] : 
"title";
 
 3400                 $tbl->setOrderColumn($order);
 
 3401                 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 3402                 $tbl->setOffset(
$_GET[
"offset"]);
 
 3403                 $tbl->setLimit(
$_GET[
"limit"]);
 
 3404                 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 3405                 $tbl->setData($result_set);
 
 3415                 $action[0] = $this->lng->txt(
'assigned_roles');
 
 3416                 $action[1] = $this->lng->txt(
'all_roles');
 
 3417                 $action[2] = $this->lng->txt(
'all_global_roles');
 
 3418                 $action[3] = $this->lng->txt(
'all_local_roles');
 
 3419                 $action[4] = $this->lng->txt(
'internal_local_roles_only');
 
 3420                 $action[5] = $this->lng->txt(
'non_internal_local_roles_only');
 
 3439                 $ilLocator->clearItems();
 
 3441                 if (
$_GET[
"admin_mode"] == 
"settings")  
 
 3443                         $ilLocator->addItem($this->lng->txt(
"administration"),
 
 3444                                 $this->ctrl->getLinkTargetByClass(
"iladministrationgui", 
"frameset"),
 
 3449                                 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
 
 3451                                         $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui", 
"view"));
 
 3453                         elseif (
$_GET[
'ref_id'] == ROLE_FOLDER_ID)
 
 3455                                 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
 
 3457                                         $this->ctrl->getLinkTargetByClass(
"ilobjrolefoldergui", 
"view"));
 
 3460                         if (
$_GET[
"obj_id"] > 0)
 
 3462                                 $ilLocator->addItem($this->object->getTitle(),
 
 3463                                         $this->ctrl->getLinkTarget($this, 
"view"));
 
 3480                 if(
$_POST[
'send_mail'] != 
'y')
 
 3484                 if(!strlen($this->object->getEmail()))
 
 3490                 $usr_lang = 
new ilLanguage($this->object->getLanguage());
 
 3492                 $usr_lang->loadLanguageModule(
'registration');
 
 3494                 include_once 
"Services/Mail/classes/class.ilMimeMail.php";
 
 3497                 $mmail->autoCheck(
false);
 
 3498                 $mmail->From($ilUser->getEmail());
 
 3499                 $mmail->To($this->object->getEmail());
 
 3502                 $subject = $usr_lang->txt(
"profile_changed");
 
 3506                 $body = ($usr_lang->txt(
"reg_mail_body_salutation").
" ".$this->
object->getFullname().
",\n\n");
 
 3508                 $date = $this->
object->getApproveDate();
 
 3510                 if((time() - strtotime($date)) < 10)
 
 3512                         $body .= ($usr_lang->txt(
'reg_mail_body_approve').
"\n\n");
 
 3516                         $body .= ($usr_lang->txt(
'reg_mail_body_profile_changed').
"\n\n");
 
 3520                 if(
$_POST[
'passwd'] != 
'********')
 
 3522                         $body .= $usr_lang->txt(
"reg_mail_body_text2").
"\n".
 
 3523                                 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n".
 
 3524                                 $usr_lang->txt(
"login").
": ".$this->
object->getLogin().
"\n".
 
 3525                                 $usr_lang->txt(
"passwd").
": ".
$_POST[
'passwd'].
"\n\n";
 
 3527                 $body .= ($usr_lang->txt(
"reg_mail_body_text3").
"\n");
 
 3528                 $body .= $this->
object->getProfileAsString($usr_lang);
 
 3530                 $mmail->Subject($subject);
 
 3531                 $mmail->Body($body);
 
 3535                 return "<br/>".$this->lng->txt(
"mail_sent");
 
 3546                 if($a_target == md5(
"usrdelown"))
 
 3548                         if($ilUser->getId() != ANONYMOUS_USER_ID &&
 
 3549                                 $ilUser->hasDeletionFlag())
 
 3551                                 $ilCtrl->setTargetScript(
"ilias.php");
 
 3552                                 $ilCtrl->initBaseClass(
"ilpersonaldesktopgui");
 
 3553                                 $ilCtrl->redirectByClass(array(
"ilpersonaldesktopgui", 
"ilpersonalsettingsgui"), 
"deleteOwnAccount3");                                          
 
 3555                         exit(
"This account is not flagged for deletion."); 
 
 3558                 if (substr($a_target, 0, 1) == 
"n")
 
 3563                 $_GET[
"cmd"] = 
"view";
 
 3564                 $_GET[
"user_id"] = (int) $a_target;
 
 3565                 $_GET[
"baseClass"] = 
"ilPublicUserProfileGUI";
 
 3566                 $_GET[
"cmdClass"] = 
"ilpublicuserprofilegui";
 
 3567                 include(
"ilias.php");
 
 3581                 $profileMaybeIncomplete = 
false;
 
 3583                 require_once 
'Services/User/classes/class.ilUserProfile.php';
 
 3587                         $elm = $this->form_gui->getItemByPostVar($fieldName);
 
 3589                         if( !$elm ) 
continue;            
 
 3591                         if( $elm->getRequired() )
 
 3593                                 $profileMaybeIncomplete = 
true;
 
 3596                                 $elm->setRequired( 
false );
 
 3600                 include_once 
'Services/User/classes/class.ilUserDefinedFields.php';
 
 3602                 foreach($user_defined_fields->getDefinitions() as $field_id => $definition)
 
 3604                         $elm = $this->form_gui->getItemByPostVar(
'udf_'.$definition[
'field_id']);
 
 3606                         if( !$elm ) 
continue;            
 
 3608                         if( $elm->getRequired() && $definition[
'changeable'] && $definition[
'required'] && $definition[
'visible'] )
 
 3610                                 $profileMaybeIncomplete = 
true;
 
 3613                                 $elm->setRequired( 
false );
 
 3617                 return $profileMaybeIncomplete;