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 "ilobjectownershipmanagementgui":
 
   89                                 include_once(
"Services/Object/classes/class.ilObjectOwnershipManagementGUI.php");
 
   91                                 $this->ctrl->forwardCommand($gui);
 
  100                                 $return = $this->
$cmd();
 
  111                 if(strtolower(get_class($this->
object)) == 
'ilobjuser')
 
  113                         $this->tpl->setTitle(
'['.$this->object->getLogin().
'] '.$this->
object->getTitle());
 
  114                         $this->tpl->setDescription($this->object->getLongDescription());
 
  115                         $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.png"), $this->lng->txt(
"obj_" . $this->object->getType()));
 
  129                 if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  131                         $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  137                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  154                 global $rbacsystem, $ilHelp;
 
  156                 $tabs_gui->clearTargets();
 
  158                 $ilHelp->setScreenIdComponent(
"usr");
 
  162                         $tabs_gui->setBackTarget(
 
  163                                 $this->lng->txt(
"search_results"),
$_SESSION[
"usr_search_link"]);
 
  165                         $tabs_gui->addTarget(
"properties",
 
  166                                 $this->ctrl->getLinkTarget($this, 
"edit"), array(
"edit",
"",
"view"), get_class($this),
"",
true);
 
  170                         $tabs_gui->addTarget(
"properties",
 
  171                                 $this->ctrl->getLinkTarget($this, 
"edit"), array(
"edit",
"",
"view"), get_class($this));
 
  174                 $tabs_gui->addTarget(
"role_assignment",
 
  175                         $this->ctrl->getLinkTarget($this, 
"roleassignment"), array(
"roleassignment"), get_class($this));
 
  178                 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
 
  179                 if($rbacsystem->checkAccess(
'read',$this->ref_id) and 
 
  184                         $tabs_gui->addTarget(
'learning_progress',
 
  185                                                                  $this->ctrl->getLinkTargetByClass(
'illearningprogressgui',
''),
 
  187                                                                  array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
 
  190                 $tabs_gui->addTarget(
'user_ownership',
 
  191                         $this->ctrl->getLinkTargetByClass(
'ilobjectownershipmanagementgui',
''),
 
  193                         'ilobjectownershipmanagementgui');
 
  201                 $this->back_target = array(
"text" => $a_text,
 
  211                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  214                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
  216                         if($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id]))
 
  227                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  230                 if($this->object->getType() == 
'usr')
 
  232                         $user_defined_data = $this->
object->getUserDefinedData();
 
  234                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
  236                         $old = isset(
$_SESSION[
"error_post_vars"][
"udf"][$field_id]) ?
 
  237                                 $_SESSION[
"error_post_vars"][
"udf"][$field_id] : $user_defined_data[$field_id];
 
  241                                 $this->tpl->setCurrentBlock(
"field_text");
 
  242                                 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
 
  244                                 $this->tpl->parseCurrentBlock();
 
  248                                 $this->tpl->setCurrentBlock(
"field_select");
 
  250                                                                                                                                                 'udf['.$definition[
'field_id'].
']',
 
  251                                                                                                                                                 $this->user_defined_fields->fieldValuesToSelectArray(
 
  252                                                                                                                                                         $definition[
'field_values']),
 
  255                                 $this->tpl->parseCurrentBlock();
 
  257                         $this->tpl->setCurrentBlock(
"user_defined");
 
  259                         if($definition[
'required'])
 
  261                                 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
 
  265                                 $name = $definition[
'field_name'];
 
  267                         $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
 
  268                         $this->tpl->parseCurrentBlock();
 
  279                         $this->tabs_gui->clearTargets();
 
  283                 $obj_list = $rbacreview->getRoleListByObject(ROLE_FOLDER_ID);
 
  285                 foreach ($obj_list as $obj_data)
 
  288                         if($this->object->getRefId() != 
USER_FOLDER_ID and !in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
 
  290                                 include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
  298                         if ($obj_data[
"obj_id"] != ANONYMOUS_ROLE_ID)
 
  301                                 if ($obj_data[
"obj_id"] != SYSTEM_ROLE_ID or in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())))
 
  303                                         $rol[$obj_data[
"obj_id"]] = $obj_data[
"title"];
 
  311                         $this->ilias->raiseError($this->lng->txt(
"msg_no_roles_users_can_be_assigned_to"),$this->ilias->error_obj->MESSAGE);
 
  314                 $keys = array_keys($rol);
 
  317                 if (in_array(4,$keys))
 
  319                         $this->default_role = 4;
 
  323                         if (count($keys) > 1 and in_array(2,$keys))
 
  326                                 foreach ($keys as $key => $val)
 
  336                         $this->default_role = array_shift($keys);
 
  338                 $this->selectable_roles = $rol;
 
  348                 if (!$rbacsystem->checkAccess(
'create_usr', $this->usrf_ref_id) and
 
  349                         !$rbacsystem->checkAccess(
'cat_administrate_users',$this->usrf_ref_id))
 
  351                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  356                 return $tpl->setContent($this->form_gui->getHtml());
 
  367         include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  370                 if (!$ilAccess->checkAccess(
'create_usr', 
"", $this->usrf_ref_id) &&
 
  371                         !$ilAccess->checkAccess(
'cat_administrate_users', 
"", $this->usrf_ref_id))
 
  373                         $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
 
  380                 $profileMaybeIncomplete = 
false;
 
  381                 if($this->form_gui->getInput(
'ignore_rf', 
false))
 
  386                 if ($this->form_gui->checkInput())
 
  393                         $userObj->setPasswd($this->form_gui->getInput(
'passwd'),
IL_PASSWD_PLAIN);
 
  394                         $userObj->setTitle($userObj->getFullname());
 
  395                         $userObj->setDescription($userObj->getEmail());
 
  398                         foreach(
$_POST as $k => $v)
 
  400                                 if (substr($k, 0, 4) == 
"udf_")
 
  402                                         $udf[substr($k, 4)] = $v;
 
  405                         $userObj->setUserDefinedData($udf);
 
  409                         include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  412                                 $userObj->setExternalAccount(
$_POST[
"ext_account"]);
 
  417                         $userObj->setLastPasswordChangeTS( time() );
 
  420                         $userObj->saveAsNew();
 
  425                                 $userObj->setLanguage(
$_POST[
"language"]);
 
  429                         require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
  439                                 $sknst = explode(
":", 
$_POST[
"skin_style"]);
 
  441                                 if ($userObj->getPref(
"style") != $sknst[1] ||
 
  442                                         $userObj->getPref(
"skin") != $sknst[0])
 
  444                                         $userObj->setPref(
"skin", $sknst[0]);
 
  445                                         $userObj->setPref(
"style", $sknst[1]);
 
  450                                 $userObj->setPref(
"hits_per_page", 
$_POST[
"hits_per_page"]);
 
  454                                 $userObj->setPref(
"show_users_online", 
$_POST[
"show_users_online"]);
 
  458                                 $userObj->setPref(
"hide_own_online_status", 
$_POST[
"hide_own_online_status"] ? 
'y' : 
'n');
 
  460                         if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
  462                                 $userObj->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
 
  464                         $userObj->writePrefs();
 
  467                         $rbacadmin->assignUser(
$_POST[
"default_role"],$userObj->getId(),
true);
 
  469                         $msg = $this->lng->txt(
"user_added");                   
 
  471                         $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
  472                         $ilUser->writePrefs();                        
 
  474                         $this->
object = $userObj;
 
  481                         if( $profileMaybeIncomplete )
 
  483                                 include_once 
'Services/User/classes/class.ilUserProfile.php';
 
  486                                         $this->
object->setProfileIncomplete( 
true );
 
  487                                         $this->
object->update();
 
  492                         if(
$_POST[
'send_mail'] == 
'y')
 
  494                                 include_once(
'Services/Mail/classes/class.ilAccountMail.php');
 
  496                                 $acc_mail->useLangVariablesAsFallback(
true);
 
  497                                 $acc_mail->setUserPassword(
$_POST[
'passwd']);
 
  498                                 $acc_mail->setUser($userObj);
 
  500                                 if ($acc_mail->send())
 
  502                                         $msg = $msg.
'<br />'.$this->lng->txt(
'mail_sent');
 
  507                                         $msg = $msg.
'<br />'.$this->lng->txt(
'mail_not_sent');
 
  517                         if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  519                                 $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  523                                 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  528                         $this->form_gui->setValuesByPost();
 
  529                         $tpl->setContent($this->form_gui->getHtml());
 
  540         global 
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, 
$ilUser 
  543                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
  546         $settings = $ilias->getAllSettings();
 
  549                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
  551                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  558                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
  560                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  566                         $this->tabs_gui->clearTargets();
 
  572                 $this->showAcceptedTermsOfService();
 
  573                 $this->tpl->setContent($this->form_gui->getHTML());
 
  599                 $user->setTimeLimitUntil($until->get(
IL_CAL_UNIX));
 
  601                 $user->setTimeLimitUnlimited($this->form_gui->getInput(
'time_limit_unlimited'));
 
  603                 if($a_mode == 
'create')
 
  605                         $user->setTimeLimitOwner($this->usrf_ref_id);
 
  611                         $bd = $this->form_gui->getInput(
'birthday');
 
  614                                 $user->setBirthday($bd[
'date']);
 
  618                                 $user->setBirthday(null);
 
  623                 $user->setLogin($this->form_gui->getInput(
'login'));
 
  629                         $user->setGender($this->form_gui->getInput(
'gender'));
 
  635                         $user->setUTitle($this->form_gui->getInput(
'title'));
 
  641                         $user->setFirstname($this->form_gui->getInput(
'firstname'));
 
  646                         $user->setLastname($this->form_gui->getInput(
'lastname'));
 
  648                 $user->setFullname();
 
  653                         $user->setInstitution($this->form_gui->getInput(
'institution'));
 
  659                         $user->setDepartment($this->form_gui->getInput(
'department'));
 
  664                         $user->setStreet($this->form_gui->getInput(
'street'));
 
  669                         $user->setCity($this->form_gui->getInput(
'city'));
 
  674                         $user->setZipcode($this->form_gui->getInput(
'zipcode'));
 
  679                         $user->setCountry($this->form_gui->getInput(
'country'));
 
  684                         $user->setSelectedCountry($this->form_gui->getInput(
'sel_country'));
 
  689                         $user->setPhoneOffice($this->form_gui->getInput(
'phone_office'));
 
  694                         $user->setPhoneHome($this->form_gui->getInput(
'phone_home'));
 
  699                         $user->setPhoneMobile($this->form_gui->getInput(
'phone_mobile'));
 
  704                         $user->setFax($this->form_gui->getInput(
'fax'));
 
  709                         $user->setMatriculation($this->form_gui->getInput(
'matriculation'));
 
  714                         $user->setEmail($this->form_gui->getInput(
'email'));
 
  719                         $user->setHobby($this->form_gui->getInput(
'hobby'));
 
  724                         $user->setComment($this->form_gui->getInput(
'referral_comment'));
 
  727                 $user->setClientIP($this->form_gui->getInput(
'client_ip'));
 
  731                         $user->setInstantMessengerId(
'icq', $this->form_gui->getInput(
'im_icq'));
 
  732                         $user->setInstantMessengerId(
'yahoo', $this->form_gui->getInput(
'im_yahoo'));
 
  733                         $user->setInstantMessengerId(
'msn', $this->form_gui->getInput(
'im_msn'));
 
  734                         $user->setInstantMessengerId(
'aim', $this->form_gui->getInput(
'im_aim'));
 
  735                         $user->setInstantMessengerId(
'skype', $this->form_gui->getInput(
'im_skype'));
 
  736                         $user->setInstantMessengerId(
'jabber', $this->form_gui->getInput(
'im_jabber'));
 
  737                         $user->setInstantMessengerId(
'voip', $this->form_gui->getInput(
'im_voip'));
 
  742                         $user->setDelicious($this->form_gui->getInput(
'delicious'));
 
  745                 $user->setLatitude($this->form_gui->getInput(
'latitude'));
 
  746                 $user->setLongitude($this->form_gui->getInput(
'longitude'));
 
  747                 $user->setLocationZoom($this->form_gui->getInput(
'loc_zoom'));
 
  750                 $user->setAuthMode($this->form_gui->getInput(
'auth_mode'));
 
  751                 $user->setExternalAccount($this->form_gui->getInput(
'ext_account'));
 
  753                 if((
int) $user->getActive() != (int) $this->form_gui->getInput(
'active'))
 
  755                         $user->setActive($this->form_gui->getInput(
'active'), $ilUser->getId());
 
  770                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
 
  772                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  779                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
  781                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
  787                 unset(
$_POST[
'approve_date']);
 
  788                 $_POST[
'agree_date'] = $this->
object->getAgreeDate();
 
  789                 unset(
$_POST[
'last_login']);
 
  792                 $profileMaybeIncomplete = 
false;
 
  793                 if($this->form_gui->getInput(
'ignore_rf', 
false))
 
  798                 if ($this->form_gui->checkInput())
 
  803                                 && trim(
$_POST[
'passwd']) != 
"")
 
  812                         if( 
$_POST[
'active'] == 1 )
 
  817                         #$this->object->assignData($_POST); 
  821                         foreach(
$_POST as $k => $v)
 
  823                                 if (substr($k, 0, 4) == 
"udf_")
 
  825                                         $udf[substr($k, 4)] = $v;
 
  828                         $this->
object->setUserDefinedData($udf);
 
  832                                 $this->
object->updateLogin(
$_POST[
'login']);
 
  837                                 $this->form_gui->setValuesByPost();
 
  838                                 return $tpl->setContent($this->form_gui->getHtml());                            
 
  841                         $this->
object->setTitle($this->object->getFullname());
 
  842                         $this->
object->setDescription($this->object->getEmail());
 
  846                                 $this->
object->setLanguage($this->form_gui->getInput(
'language'));
 
  849                         require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
  864                                 $sknst = explode(
":", 
$_POST[
"skin_style"]);
 
  866                                 if ($this->object->getPref(
"style") != $sknst[1] ||
 
  867                                         $this->
object->getPref(
"skin") != $sknst[0])
 
  869                                         $this->
object->setPref(
"skin", $sknst[0]);
 
  870                                         $this->
object->setPref(
"style", $sknst[1]);
 
  875                                 $this->
object->setPref(
"hits_per_page", 
$_POST[
"hits_per_page"]);
 
  879                                 $this->
object->setPref(
"show_users_online", 
$_POST[
"show_users_online"]);
 
  883                                 $this->
object->setPref(
"hide_own_online_status", 
$_POST[
"hide_own_online_status"] ? 
'y' : 
'n');
 
  888                         $this->
object->setLastPasswordChangeTS( time() );
 
  891                         if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
  893                                 $this->
object->setPref(
'session_reminder_enabled', (
int)
$_POST[
'session_reminder_enabled']);
 
  897                         $this->
object->setProfileIncomplete( 
false );
 
  899                         $this->update = $this->
object->update();
 
  904                         if ($ilUser->getId() == $this->
object->getId()) 
 
  906                                 $ilUser->readPrefs();    
 
  908                         $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
  909                         $ilUser->writePrefs();
 
  912                         $msg = $this->lng->txt(
'saved_successfully').$mail_message;
 
  920                         if( $profileMaybeIncomplete )
 
  922                                 include_once 
'Services/User/classes/class.ilUserProfile.php';
 
  925                                         $this->
object->setProfileIncomplete( 
true );
 
  926                                         $this->
object->update();
 
  933                         if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
  935                                 $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
  939                                 $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
  944                         $this->form_gui->setValuesByPost();
 
  945                         $tpl->setContent($this->form_gui->getHtml());
 
  959                 $data[
"auth_mode"] = $this->
object->getAuthMode();
 
  960                 $data[
"login"] = $this->
object->getLogin();
 
  963                 $data[
"ext_account"] = $this->
object->getExternalAccount();
 
  966                 require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
  969                 $data[
"approve_date"] = ($this->
object->getApproveDate() != 
"")
 
  972                 $data[
"agree_date"] = ($this->
object->getAgreeDate() != 
"")
 
  975                 $data[
"last_login"] =  ($this->
object->getLastLogin() != 
"")
 
  978                 $data[
"active"] = $this->
object->getActive();
 
  979                 $data[
"time_limit_unlimited"] = $this->
object->getTimeLimitUnlimited();
 
  981                 $from = 
new ilDateTime($this->object->getTimeLimitFrom() ? $this->
object->getTimeLimitFrom() : time(),
IL_CAL_UNIX);
 
  982                 $data[
"time_limit_from"][
"date"] = $from->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
 
  983                 $data[
"time_limit_from"][
"time"] = $from->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
 
  985                 $until = 
new ilDateTime($this->object->getTimeLimitUntil() ? $this->
object->getTimeLimitUntil() : time(),
IL_CAL_UNIX);
 
  986                 $data[
'time_limit_until'][
'date'] = $until->
get(
IL_CAL_FKT_DATE,
'Y-m-d',$ilUser->getTimeZone());
 
  987                 $data[
'time_limit_until'][
'time'] = $until->
get(
IL_CAL_FKT_DATE,
'H:i:s',$ilUser->getTimeZone());
 
  991                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
 1020                 $data[
"gender"] = $this->
object->getGender();
 
 1021                 $data[
"firstname"] = $this->
object->getFirstname();
 
 1022                 $data[
"lastname"] = $this->
object->getLastname();
 
 1023                 $data[
"title"] = $this->
object->getUTitle();
 
 1024                 $data[
'birthday'] = $this->
object->getBirthday();
 
 1025                 $data[
"institution"] = $this->
object->getInstitution();
 
 1026                 $data[
"department"] = $this->
object->getDepartment();
 
 1027                 $data[
"street"] = $this->
object->getStreet();
 
 1028                 $data[
"city"] = $this->
object->getCity();
 
 1029                 $data[
"zipcode"] = $this->
object->getZipcode();
 
 1030                 $data[
"country"] = $this->
object->getCountry();
 
 1031                 $data[
"sel_country"] = $this->
object->getSelectedCountry();
 
 1032                 $data[
"phone_office"] = $this->
object->getPhoneOffice();
 
 1033                 $data[
"phone_home"] = $this->
object->getPhoneHome();
 
 1034                 $data[
"phone_mobile"] = $this->
object->getPhoneMobile();
 
 1035                 $data[
"fax"] = $this->
object->getFax();
 
 1036                 $data[
"email"] = $this->
object->getEmail();
 
 1037                 $data[
"hobby"] = $this->
object->getHobby();
 
 1038                 $data[
"referral_comment"] = $this->
object->getComment();
 
 1041                 $data[
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
 
 1042                 $data[
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
 
 1043                 $data[
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
 
 1044                 $data[
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
 
 1045                 $data[
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
 
 1046                 $data[
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
 
 1047                 $data[
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
 
 1050                 $data[
"matriculation"] = $this->
object->getMatriculation();
 
 1051                 $data[
"delicious"] = $this->
object->getDelicious();
 
 1052                 $data[
"client_ip"] = $this->
object->getClientIP();
 
 1055                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
 1057                 $user_defined_data = $this->
object->getUserDefinedData();
 
 1058                 foreach($this->user_defined_fields->getDefinitions() as $field_id => $definition)
 
 1060                         $data[
"udf_".$field_id] = $user_defined_data[
"f_".$field_id];
 
 1064                 $data[
"language"] = $this->
object->getLanguage();
 
 1065                 $data[
"skin_style"] = $this->
object->skin.
":".$this->
object->prefs[
"style"];
 
 1066                 $data[
"hits_per_page"] = $this->
object->prefs[
"hits_per_page"];
 
 1067                 $data[
"show_users_online"] = $this->
object->prefs[
"show_users_online"];
 
 1068                 $data[
"hide_own_online_status"] = $this->
object->prefs[
"hide_own_online_status"] == 
'y';
 
 1069                 $data[
"session_reminder_enabled"] = (int)$this->object->prefs[
"session_reminder_enabled"];
 
 1071                 $this->form_gui->setValuesByArray($data);
 
 1081                 $settings = $ilSetting->getAll();
 
 1083                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1086                 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
 
 1087                 if ($a_mode == 
"create")
 
 1089                         $this->form_gui->setTitle($lng->txt(
"usr_new"));
 
 1093                         $this->form_gui->setTitle($lng->txt(
"usr_edit"));
 
 1098                 $sec_l->setTitle($lng->txt(
"login_data"));
 
 1099                 $this->form_gui->addItem($sec_l);
 
 1102                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1106                 foreach ($active_auth_modes as $auth_name => $auth_key)
 
 1108                         if ($auth_name == 
'default')
 
 1114                                 $name = $this->lng->txt(
'auth_'.$auth_name);
 
 1116                         $option[$auth_name] = $name;
 
 1119                 $this->form_gui->addItem($am);
 
 1124                 if ($a_mode == 
"edit")
 
 1126                         $lo->setCurrentUserId($this->object->getId());
 
 1129                                 include_once 
'Services/Calendar/classes/class.ilDate.php';                              
 
 1134                                                 $this->lng->txt(
'usr_loginname_history_info'),
 
 1136                                                 $last_history_entry[0]
 
 1143                 $this->form_gui->addItem($lo);
 
 1151                         $pw->setMaxLength(32);
 
 1152                         $pw->setValidateAuthPost(
"auth_mode");
 
 1153                         if ($a_mode == 
"create")
 
 1155                                 $pw->setRequiredOnAuth(
true);
 
 1158                         $this->form_gui->addItem($pw);
 
 1163                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1166                         $ext = 
new ilTextInputGUI($lng->txt(
"user_ext_account"), 
"ext_account");
 
 1168                         $ext->setMaxLength(50);
 
 1169                         $ext->setInfo($lng->txt(
"user_ext_account_desc"));
 
 1170                         $this->form_gui->addItem($ext);
 
 1175                 $sec_si->setTitle($this->lng->txt(
"system_information"));
 
 1176                 $this->form_gui->addItem($sec_si);
 
 1179                 if ($a_mode == 
"edit")
 
 1181                         $sia = array(
"create_date", 
"approve_date", 
"agree_date", 
"last_login", 
"owner");
 
 1185                                 $this->form_gui->addItem($siai);
 
 1192                 $this->form_gui->addItem($ac);
 
 1195                 $lng->loadLanguageModule(
'crs');
 
 1200                         $op1 = 
new ilRadioOption($lng->txt(
"user_access_unlimited"), 1);
 
 1201                         $radg->addOption($op1);
 
 1202                         $op2 = 
new ilRadioOption($lng->txt(
"user_access_limited"), 0);
 
 1203                         $radg->addOption($op2);
 
 1213                 $op2->addSubItem($acfrom);
 
 1219                 $op2->addSubItem($acto);
 
 1222                 $this->form_gui->addItem($radg);
 
 1224                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
 
 1227                         $lng->loadLanguageModule(
"file");
 
 1230                         $quota_head->setTitle($lng->txt(
"repository_disk_quota"));
 
 1231                         $this->form_gui->addItem($quota_head);
 
 1234                         $disk_quota = 
new ilTextInputGUI($lng->txt(
"disk_quota"), 
"disk_quota");
 
 1236                         $disk_quota->setMaxLength(11);
 
 1237                         $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
 
 1238                         $this->form_gui->addItem($disk_quota);
 
 1240                         if ($a_mode == 
"edit")
 
 1243                                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
 
 1245                                 if ($dq_info[
'user_disk_quota'] > $dq_info[
'role_disk_quota'])
 
 1247                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
 
 1250                                                 $dq_info[
'role_title']);
 
 1252                                 else if (is_infinite($dq_info[
'role_disk_quota']))
 
 1254                                         $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
 
 1258                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
 
 1260                                                 $dq_info[
'role_title']);
 
 1262                                 $disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
 
 1268                                 if ($du_info[
'last_update'] === null)
 
 1270                                         $disk_usage->
setValue($lng->txt(
'unknown'));
 
 1274                                 require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
 1276                                 $info = 
'<table class="il_user_quota_disk_usage_overview">';
 
 1278                                         foreach ($du_info[
'details'] as $detail_data)
 
 1281                                                         '<td class="std">'.$detail_data[
'count'].
'</td>'.
 
 1282                                                         '<td class="std">'.$lng->txt($detail_data[
'type']).
'</td>'.
 
 1283                                                         '<td class="std">'.ilFormat::formatSize($detail_data[
'size'], 
'short').
'</td>'.
 
 1287                                         $info .= 
'</table>';
 
 1288                                         $info .= 
'<br>'.$this->lng->txt(
'last_update').
': '.
 
 1290                                         $disk_usage->setInfo($info);
 
 1293                                 $this->form_gui->addItem($disk_usage);
 
 1296                                 if (
true || $dq_info[
'last_reminder'])
 
 1302                                         $reminder->setInfo($this->lng->txt(
"disk_quota_last_reminder_sent_desc"));
 
 1303                                         $this->form_gui->addItem($reminder);
 
 1310                         $lng->loadLanguageModule(
"file");
 
 1313                         $quota_head->setTitle($lng->txt(
"personal_workspace_disk_quota"));
 
 1314                         $this->form_gui->addItem($quota_head);
 
 1317                         $wsp_disk_quota = 
new ilTextInputGUI($lng->txt(
"disk_quota"), 
"wsp_disk_quota");
 
 1319                         $wsp_disk_quota->setMaxLength(11);
 
 1320                         $wsp_disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc"));
 
 1321                         $this->form_gui->addItem($wsp_disk_quota);
 
 1323                         if ($a_mode == 
"edit")
 
 1326                                 require_once 
'Services/WebDAV/classes/class.ilDiskQuotaChecker.php';
 
 1328                                 if ($dq_info[
'user_wsp_disk_quota'] > $dq_info[
'role_wsp_disk_quota'])
 
 1330                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_instead_of_2_by_3'),
 
 1333                                                 $dq_info[
'role_title']);
 
 1335                                 else if (is_infinite($dq_info[
'role_wsp_disk_quota']))
 
 1337                                         $info_text = sprintf($lng->txt(
'disk_quota_is_unlimited_by_1'), $dq_info[
'role_title']);
 
 1341                                         $info_text = sprintf($lng->txt(
'disk_quota_is_1_by_2'),
 
 1343                                                 $dq_info[
'role_title']);
 
 1345                                 $wsp_disk_quota->setInfo($this->lng->txt(
"enter_in_mb_desc").
'<br>'.$info_text);
 
 1349                         include_once 
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
 
 1352                         if (!
sizeof($du_info))
 
 1354                                 $disk_usage->
setValue($lng->txt(
'unknown'));
 
 1358                                 require_once 
'./Services/Utilities/classes/class.ilFormat.php';
 
 1360                                 $info = 
'<table class="il_user_quota_disk_usage_overview">';
 
 1362                                 foreach ($du_info as $detail_data)
 
 1365                                                 '<td class="std">'.$detail_data[
'count'].
'</td>'.
 
 1366                                                 '<td class="std">'.$lng->txt(
"obj_".$detail_data[
"src_type"]).
'</td>'.
 
 1367                                                 '<td class="std">'.ilFormat::formatSize($detail_data[
'filesize'], 
'short').
'</td>'.
 
 1371                                 $info .= 
'</table>';
 
 1372                                 $disk_usage->setInfo($info);
 
 1375                         $this->form_gui->addItem($disk_usage);
 
 1389                         $sec_pd->setTitle($this->lng->txt(
"personal_data"));
 
 1390                         $this->form_gui->addItem($sec_pd);
 
 1397                         $gndr->
setRequired(isset($settings[
"require_gender"]) && $settings[
"require_gender"]);
 
 1399                         $gndr->addOption($female);
 
 1401                         $gndr->addOption($male);
 
 1402                         $this->form_gui->addItem($gndr);
 
 1406                 $fields = array(
"firstname" => 
true, 
"lastname" => 
true,
 
 1407                         "title" => isset($settings[
"require_title"]) && $settings[
"require_title"]);
 
 1408                 foreach($fields as $field => $req)
 
 1414                                 $inp->setMaxLength(32);
 
 1415                                 $inp->setRequired($req);
 
 1416                                 $this->form_gui->addItem($inp);
 
 1424                         if ($a_mode == 
"edit" || $a_mode == 
"upload")
 
 1429                         $this->form_gui->addItem($pi);
 
 1435                         $birthday->
setRequired(isset($settings[
"require_birthday"]) && $settings[
"require_birthday"]);
 
 1436                         $birthday->setShowEmpty(
true);
 
 1437                         $birthday->setStartYear(1900);
 
 1438                         $this->form_gui->addItem($birthday);
 
 1445                         array(
"institution", 40, 80),
 
 1446                         array(
"department", 40, 80),
 
 1447                         array(
"street", 40, 40),
 
 1448                         array(
"city", 40, 40),
 
 1449                         array(
"zipcode", 10, 10),
 
 1450                         array(
"country", 40, 40),
 
 1451                         array(
"sel_country"),
 
 1452                         array(
"phone_office", 30, 30),
 
 1453                         array(
"phone_home", 30, 30),
 
 1454                         array(
"phone_mobile", 30, 30),
 
 1455                         array(
"fax", 30, 30));
 
 1458                 foreach ($fields as $field)
 
 1464                                 $sec_cd->setTitle($this->lng->txt(
"contact_data"));
 
 1465                                 $this->form_gui->addItem($sec_cd);
 
 1469                                 if ($field[0] != 
"sel_country")
 
 1473                                         $inp->setMaxLength($field[2]);
 
 1474                                         $inp->setRequired(isset($settings[
"require_".$field[0]]) &&
 
 1475                                                 $settings[
"require_".$field[0]]);
 
 1476                                         $this->form_gui->addItem($inp);
 
 1481                                         include_once(
"./Services/Form/classes/class.ilCountrySelectInputGUI.php");
 
 1483                                         $cs->
setRequired(isset($settings[
"require_".$field[0]]) &&
 
 1484                                                 $settings[
"require_".$field[0]]);
 
 1485                                         $this->form_gui->addItem($cs);
 
 1494                         $em->
setRequired(isset($settings[
"require_email"]) &&
 
 1495                                 $settings[
"require_email"]);
 
 1496                         $this->form_gui->addItem($em);
 
 1505                         $hob->setRequired(isset($settings[
"require_hobby"]) &&
 
 1506                                 $settings[
"require_hobby"]);
 
 1507                         $this->form_gui->addItem($hob);
 
 1516                         $rc->setRequired(isset($settings[
"require_referral_comment"]) &&
 
 1517                                 $settings[
"require_referral_comment"]);
 
 1518                         $this->form_gui->addItem($rc);
 
 1525                         $sec_im->setTitle($this->lng->txt(
"instant_messengers"));
 
 1526                         $this->form_gui->addItem($sec_im);
 
 1530                 $fields = array(
"icq", 
"yahoo", 
"msn", 
"aim", 
"skype", 
"jabber", 
"voip");
 
 1531                 foreach ($fields as $field)
 
 1537                                 $im->setMaxLength(40);
 
 1538                                 $this->form_gui->addItem($im);
 
 1546                         $sec_oi->setTitle($this->lng->txt(
"user_profile_other"));
 
 1547                         $this->form_gui->addItem($sec_oi);
 
 1553                         $mr = 
new ilTextInputGUI($lng->txt(
"matriculation"), 
"matriculation");
 
 1555                         $mr->setMaxLength(40);
 
 1556                         $mr->setRequired(isset($settings[
"require_matriculation"]) &&
 
 1557                                 $settings[
"require_matriculation"]);
 
 1558                         $this->form_gui->addItem($mr);
 
 1566                         $mr->setMaxLength(40);
 
 1567                         $mr->setRequired(isset($settings[
"require_delicious"]) &&
 
 1568                                 $settings[
"require_delicious"]);
 
 1569                         $this->form_gui->addItem($mr);
 
 1575                 $ip->setMaxLength(255);
 
 1576                 $ip->setInfo($this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
" <br />".
 
 1577                         '<span class="warning">'.$this->lng->txt(
"current_ip_alert").
"</span>");
 
 1578                 $this->form_gui->addItem($ip);
 
 1581                 include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
 1586                         $all_defs = $user_defined_fields->getDefinitions();
 
 1590                         $all_defs = $user_defined_fields->getChangeableLocalUserAdministrationDefinitions();
 
 1593                 foreach($all_defs as $field_id => $definition)
 
 1598                                         "udf_".$definition[
'field_id']);
 
 1600                                 $udf->setMaxLength(255);
 
 1605                                         "udf_".$definition[
'field_id']);
 
 1606                                 $udf->setUseRte(
true);
 
 1611                                         "udf_".$definition[
'field_id']);
 
 1612                                 $udf->setOptions($user_defined_fields->fieldValuesToSelectArray(
 
 1613                                                         $definition[
'field_values']));
 
 1615                         $udf->setRequired($definition[
'required']);
 
 1616                         $this->form_gui->addItem($udf);
 
 1621                         $a_mode == 
'create' or
 
 1629                         $sec_st->setTitle($this->lng->txt(
"settings"));
 
 1630                         $this->form_gui->addItem($sec_st);
 
 1634                 if ($a_mode == 
"create")
 
 1639                         $role->setValue($this->default_role);
 
 1640                         $role->setOptions($this->selectable_roles);
 
 1641                         $this->form_gui->addItem($role);
 
 1649                         $languages = $lng->getInstalledLanguages();
 
 1650                         $lng->loadLanguageModule(
"meta");
 
 1652                         foreach($languages as $l)
 
 1654                                 $options[$l] = $lng->txt(
"meta_l_".$l);
 
 1657                         $lang->setValue($ilSetting->get(
"language"));
 
 1658                         $this->form_gui->addItem(
$lang);
 
 1666                         $templates = $styleDefinition->getAllTemplates();
 
 1668                         include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
 
 1671                         if (count($templates) > 0 && is_array ($templates))
 
 1673                                 foreach ($templates as $template)
 
 1676                                         $styleDef->startParsing();
 
 1677                                         $styles = $styleDef->getStyles();
 
 1678                                         foreach ($styles as $style)
 
 1684                                                 $options[$template[
"id"].
":".$style[
"id"]] =
 
 1685                                                         $styleDef->getTemplateName().
" / ".$style[
"name"];
 
 1690                         $sk->setValue($ilClientIniFile->readVariable(
"layout",
"skin").
 
 1691                                 ":".$ilClientIniFile->readVariable(
"layout",
"style"));
 
 1693                         $this->form_gui->addItem($sk);
 
 1701                         $options = array(10 => 10, 15 => 15, 20 => 20, 30 => 30, 40 => 40,
 
 1702                                 50 => 50, 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
 
 1703                         $hpp->setOptions($options);
 
 1704                         $hpp->setValue($ilSetting->get(
"hits_per_page"));
 
 1705                         $this->form_gui->addItem($hpp);
 
 1709                                 'show_users_online');
 
 1711                                 "y" => $lng->txt(
"users_online_show_y"),
 
 1712                                 "associated" => $lng->txt(
"users_online_show_associated"),
 
 1713                                 "n" => $lng->txt(
"users_online_show_n"));
 
 1715                         $uo->setValue($ilSetting->get(
"show_users_online"));
 
 1716                         $this->form_gui->addItem($uo);
 
 1722                         $os = 
new ilCheckboxInputGUI($lng->txt(
"hide_own_online_status"), 
"hide_own_online_status");
 
 1723                         $this->form_gui->addItem($os);
 
 1726                 if((
int)$ilSetting->get(
'session_reminder_enabled'))
 
 1728                         $cb = 
new ilCheckboxInputGUI($this->lng->txt(
'session_reminder'), 
'session_reminder_enabled');
 
 1730                         $this->form_gui->addItem($cb);
 
 1737                         $sec_op->setTitle($this->lng->txt(
"options"));
 
 1738                         $this->form_gui->addItem($sec_op);
 
 1743                 $se->
setInfo($lng->txt(
'inform_user_mail_info'));
 
 1745                 $se->setChecked(($ilUser->getPref(
'send_info_mails') == 
'y'));
 
 1746                 $this->form_gui->addItem($se);
 
 1750                 $irf->
setInfo($lng->txt(
'ignore_required_fields_info'));
 
 1752                 $this->form_gui->addItem($irf);
 
 1757                 if ($a_mode == 
"create" || $a_mode == 
"save")
 
 1759                         $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
 
 1761                 if ($a_mode == 
"edit" || $a_mode == 
"update")
 
 1763                         $this->form_gui->addCommandButton(
"update", $lng->txt(
"save"));
 
 1765                 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
 
 1781                 static $settings = null;
 
 1790                 if($settings == NULL)
 
 1792                         $settings = $ilSetting->getAll();
 
 1794                 return (
bool) $settings[
'usr_settings_changeable_lua_'.$a_field];
 
 1804         global 
$ilias, $rbacsystem, $rbacreview, $rbacadmin, $styleDefinition, 
$ilUser 
 1807                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 1811         $settings = $ilias->getAllSettings();
 
 1814                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
 1816                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 1823                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 1825                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 1831                         $this->tabs_gui->clearTargets();
 
 1835                 $data[
"fields"] = array();
 
 1836                 $data[
"fields"][
"login"] = $this->
object->getLogin();
 
 1837                 $data[
"fields"][
"passwd"] = 
"********"; 
 
 1838                 #$data["fields"]["passwd2"] = "********";       // will not be saved 
 1839                 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
 
 1840                 $data[
"fields"][
"title"] = $this->
object->getUTitle();
 
 1841                 $data[
"fields"][
"gender"] = $this->
object->getGender();
 
 1842                 $data[
"fields"][
"firstname"] = $this->
object->getFirstname();
 
 1843                 $data[
"fields"][
"lastname"] = $this->
object->getLastname();
 
 1844                 $data[
"fields"][
"institution"] = $this->
object->getInstitution();
 
 1845                 $data[
"fields"][
"department"] = $this->
object->getDepartment();
 
 1846                 $data[
"fields"][
"street"] = $this->
object->getStreet();
 
 1847                 $data[
"fields"][
"city"] = $this->
object->getCity();
 
 1848                 $data[
"fields"][
"zipcode"] = $this->
object->getZipcode();
 
 1849                 $data[
"fields"][
"country"] = $this->
object->getCountry();
 
 1850                 $data[
"fields"][
"sel_country"] = $this->
object->getSelectedCountry();
 
 1851                 $data[
"fields"][
"phone_office"] = $this->
object->getPhoneOffice();
 
 1852                 $data[
"fields"][
"phone_home"] = $this->
object->getPhoneHome();
 
 1853                 $data[
"fields"][
"phone_mobile"] = $this->
object->getPhoneMobile();
 
 1854                 $data[
"fields"][
"fax"] = $this->
object->getFax();
 
 1855                 $data[
"fields"][
"email"] = $this->
object->getEmail();
 
 1856                 $data[
"fields"][
"hobby"] = $this->
object->getHobby();
 
 1857                 $data[
"fields"][
"im_icq"] = $this->
object->getInstantMessengerId(
'icq');
 
 1858                 $data[
"fields"][
"im_yahoo"] = $this->
object->getInstantMessengerId(
'yahoo');
 
 1859                 $data[
"fields"][
"im_msn"] = $this->
object->getInstantMessengerId(
'msn');
 
 1860                 $data[
"fields"][
"im_aim"] = $this->
object->getInstantMessengerId(
'aim');
 
 1861                 $data[
"fields"][
"im_skype"] = $this->
object->getInstantMessengerId(
'skype');
 
 1862                 $data[
"fields"][
"im_jabber"] = $this->
object->getInstantMessengerId(
'jabber');
 
 1863                 $data[
"fields"][
"im_voip"] = $this->
object->getInstantMessengerId(
'voip');
 
 1864                 $data[
"fields"][
"matriculation"] = $this->
object->getMatriculation();
 
 1865                 $data[
"fields"][
"client_ip"] = $this->
object->getClientIP();
 
 1866                 $data[
"fields"][
"referral_comment"] = $this->
object->getComment();
 
 1868                 $data[
"fields"][
"create_date"] = $this->
object->getCreateDate();
 
 1869                 $data[
"fields"][
"approve_date"] = $this->
object->getApproveDate();
 
 1870                 $data[
"fields"][
"agree_date"] = $this->
object->getAgreeDate();
 
 1871                 $data[
"fields"][
"last_login"] = $this->
object->getLastLogin();
 
 1872                 $data[
"fields"][
"active"] = $this->
object->getActive();
 
 1873                 $data[
"fields"][
"auth_mode"] = $this->
object->getAuthMode();
 
 1874                 $data[
"fields"][
"ext_account"] = $this->
object->getExternalAccount();
 
 1877                 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"personal_picture"));
 
 1879                 $full_img = $this->
object->getPref(
"profile_image");
 
 1880                 $last_dot = strrpos($full_img, 
".");
 
 1881                 $small_img = substr($full_img, 0, $last_dot).
 
 1882                                 "_small".substr($full_img, $last_dot, strlen($full_img) - $last_dot);
 
 1883                 $image_file = $webspace_dir.
"/usr_images/".$small_img;
 
 1884                 if (@is_file($image_file))
 
 1886                         $this->tpl->setVariable(
"IMG_PERSONAL", $image_file.
"?dummy=".rand(1,99999));
 
 1887                         $this->tpl->setVariable(
"ALT_IMG_PERSONAL",$this->lng->txt(
"personal_picture"));
 
 1888                         $this->tpl->setVariable(
"TXT_REMOVE_PIC", $this->lng->txt(
"remove_personal_picture"));
 
 1891                 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
 
 1892                 $this->tpl->setVariable(
"TXT_FILE", $this->lng->txt(
"userfile"));
 
 1893                 $this->tpl->setVariable(
"USER_FILE", $this->lng->txt(
"user_file"));
 
 1918                         $user_is_online = 
false;
 
 1922                         $user_is_online = 
true;
 
 1925                         preg_match(
"/RoleId.*?;\}/",$user_online[$this->object->getId()][
"data"],$matches);
 
 1927                         $active_roles = unserialize(substr($matches[0],7));
 
 1930                         $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
 
 1932                         foreach ($assigned_roles as $key => $role)
 
 1934                                 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role);
 
 1937                                 $rolf = $rbacreview->getFoldersAssignedToRole($role,
true);
 
 1940                                 if (count($rolf) > 0)
 
 1942                                         if (!$rbacreview->isDeleted($rolf[0]))
 
 1946                                                 if ($this->tree->isInTree($rolf[0]))
 
 1948                                                         $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 1951                                                         for ($i = 0; $i < (count($tmpPath)-1); $i++)
 
 1958                                                                 $path .= $tmpPath[$i][
"title"];
 
 1963                                                         $path = 
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role.
")</b>";
 
 1965                                                 $active_roles = $active_roles ? $active_roles : array();
 
 1966                                                 if (in_array($role,$active_roles))
 
 1968                                                         $data[
"active_role"][$role][
"active"] = 
true;
 
 1971                                                 $data[
"active_role"][$role][
"title"] = $roleObj->getTitle();
 
 1972                                                 $data[
"active_role"][$role][
"context"] = 
$path;
 
 1979                                         $path = 
"<b>No role folder found for role ".$role.
"!</b>";
 
 1984                 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_edit.html',
'Services/User');
 
 1987                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"]))
 
 1989             if (!isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"]))
 
 1991                 $_SESSION[
"error_post_vars"][
"Fobject"][
"active"] = 0;
 
 1994                         foreach (
$_SESSION[
"error_post_vars"][
"Fobject"] as $key => $val)
 
 1996                                 $str = $this->lng->txt($key);
 
 1997                                 if ($key == 
"title")
 
 1999                                         $str = $this->lng->txt(
"person_title");
 
 2001                                 if($key == 
'passwd2')
 
 2005                                 if($key == 
'passwd')
 
 2010                                                 $this->tpl->setCurrentBlock(
'passwords_visible');
 
 2011                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2012                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2013                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd']);
 
 2014                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
$_SESSION[
'error_post_vars'][
'Fobject'][
'passwd2']);
 
 2015                                                 $this->tpl->parseCurrentBlock();
 
 2019                                                 $this->tpl->setCurrentBlock(
'passwords_invisible');
 
 2020                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2021                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2022                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
 
 2025                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
 
 2028                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
 
 2029                                                 $this->tpl->parseCurrentBlock();
 
 2036                 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
 
 2038                     $str = $str . 
'<span class="asterisk">*</span>';
 
 2041                                 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
 
 2043                                 if ($key != 
"default_role" and $key != 
"language" 
 2044                                         and $key != 
"skin_style" and $key != 
"hits_per_page" 
 2045                                         and $key != 
"show_users_online")
 
 2057                                 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
 
 2060             $active = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"active"];
 
 2063                 $this->tpl->setVariable(
"ACTIVE", 
"checked=\"checked\"");
 
 2068             if (!isset($data[
"fields"][
"active"]))
 
 2070                 $data[
"fields"][
"active"] = 0;
 
 2073                         foreach ($data[
"fields"] as $key => $val)
 
 2075                                 $str = $this->lng->txt($key);
 
 2076                                 if ($key == 
"title")
 
 2078                                         $str = $this->lng->txt(
"person_title");
 
 2080                                 if ($key == 
"ext_account")
 
 2084                                 if($key == 
'passwd')
 
 2086                                         $auth_mode = $this->
object->getAuthMode(
true);
 
 2089                                                 $this->tpl->setCurrentBlock(
'passwords_visible');
 
 2090                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2091                                                 $this->tpl->setVariable(
'VISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2092                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD',
"********");
 
 2093                                                 $this->tpl->setVariable(
'VISIBLE_PASSWD2',
"********");
 
 2094                                                 $this->tpl->parseCurrentBlock();
 
 2098                                                 $this->tpl->setCurrentBlock(
'passwords_invisible');
 
 2099                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD',$this->lng->txt(
'passwd'));
 
 2100                                                 $this->tpl->setVariable(
'INVISIBLE_TXT_PASSWD2',$this->lng->txt(
'retype_password'));
 
 2101                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD',strlen($this->object->getPasswd()) ?
 
 2104                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD2',strlen($this->object->getPasswd()) ?
 
 2107                                                 $this->tpl->setVariable(
'INVISIBLE_PASSWD_HIDDEN',
"********");
 
 2108                                                 $this->tpl->parseCurrentBlock();
 
 2114                 if (isset($settings[
"require_" . $key]) && $settings[
"require_" . $key])
 
 2116                     $str = $str . 
'<span class="asterisk">*</span>';
 
 2119                                 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
 
 2122                                 #$this->tpl->parseCurrentBlock(); 
 2126                         $gender = strtoupper($data[
"fields"][
"gender"]);
 
 2130                                 $this->tpl->setVariable(
"BTN_GENDER_".
$gender,
"checked=\"checked\"");
 
 2133                         $active = $data[
"fields"][
"active"];
 
 2136                                 $this->tpl->setVariable(
"ACTIVE", 
"checked=\"checked\"");
 
 2141                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2144                         $this->tpl->setCurrentBlock(
"ext_account");
 
 2145                         $this->tpl->setVariable(
"TXT_EXT_ACCOUNT",$this->lng->txt(
"user_ext_account"));
 
 2146                         $this->tpl->setVariable(
"TXT_EXT_ACCOUNT_DESC",$this->lng->txt(
"user_ext_account_desc"));
 
 2147                         if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]))
 
 2149                                 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
 
 2150                                         $_SESSION[
"error_post_vars"][
"Fobject"][
"ext_account"]);
 
 2154                                 $this->tpl->setVariable(
"EXT_ACCOUNT_VAL",
 
 2155                                         $data[
"fields"][
"ext_account"]);
 
 2166                         $this->tpl->parseCurrentBlock();
 
 2168                 $auth_mode = 
$_SESSION[
'error_post_vars'][
'Fobject'][
'auth_mode'] ?
 
 2170                         $this->
object->getAuthMode(
true);
 
 2173                         $this->tpl->setVariable(
"OPTION_DISABLED", 
"\"disabled=disabled\"");
 
 2175                 $obj_str = ($this->call_by_reference) ? 
"" : 
"&obj_id=".$this->obj_id;
 
 2177                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 2178                 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
 
 2179                 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 2180                 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
 2181                 $this->tpl->setVariable(
"CMD_SUBMIT", 
"update");
 
 2182                 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
 
 2183                 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
 
 2185                 $this->tpl->setVariable(
"TXT_LOGIN_DATA", $this->lng->txt(
"login_data"));
 
 2186         $this->tpl->setVariable(
"TXT_SYSTEM_INFO", $this->lng->txt(
"system_information"));
 
 2187                 $this->tpl->setVariable(
"TXT_PERSONAL_DATA", $this->lng->txt(
"personal_data"));
 
 2188                 $this->tpl->setVariable(
"TXT_CONTACT_DATA", $this->lng->txt(
"contact_data"));
 
 2189                 $this->tpl->setVariable(
"TXT_SETTINGS", $this->lng->txt(
"settings"));
 
 2190                 $this->tpl->setVariable(
"TXT_LANGUAGE",$this->lng->txt(
"language"));
 
 2191                 $this->tpl->setVariable(
"TXT_SKIN_STYLE",$this->lng->txt(
"usr_skin_style"));
 
 2192                 $this->tpl->setVariable(
"TXT_HITS_PER_PAGE",$this->lng->txt(
"hits_per_page"));
 
 2193                 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE",$this->lng->txt(
"show_users_online"));
 
 2194                 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
 
 2195                 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
 
 2196                 $this->tpl->setVariable(
"TXT_INSTANT_MESSENGERS",$this->lng->txt(
"user_profile_instant_messengers"));
 
 2197                 $this->tpl->setVariable(
"TXT_OTHER",$this->lng->txt(
"user_profile_other"));
 
 2198                 if ($this->object->getId() == $ilUser->getId())
 
 2200                         $this->tpl->setVariable(
"TXT_CURRENT_IP",
"(".$this->lng->txt(
"current_ip").
" ".$_SERVER[
"REMOTE_ADDR"].
")");
 
 2202                 $this->tpl->setVariable(
"TXT_CURRENT_IP_ALERT",$this->lng->txt(
"current_ip_alert"));
 
 2205                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2209                 $selected_auth_mode = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"])) ? 
$_SESSION[
"error_post_vars"][
"Fobject"][
"auth_mode"] : $this->object->getAuthMode();
 
 2211                 foreach ($active_auth_modes as $auth_name => $auth_key)
 
 2213                         $this->tpl->setCurrentBlock(
"auth_mode_selection");
 
 2215                         if ($auth_name == 
'default')
 
 2221                                 $name = $this->lng->txt(
'auth_'.$auth_name);
 
 2224                         $this->tpl->setVariable(
"AUTH_MODE_NAME", $name);
 
 2226                         $this->tpl->setVariable(
"AUTH_MODE", $auth_name);
 
 2228                         if ($selected_auth_mode == $auth_name)
 
 2230                                 $this->tpl->setVariable(
"SELECTED_AUTH_MODE", 
"selected=\"selected\"");
 
 2233                         $this->tpl->parseCurrentBlock();
 
 2238                 $languages = $this->lng->getInstalledLanguages();
 
 2241                 $selected_lang = (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"])) ? 
$_SESSION[
"error_post_vars"][
"Fobject"][
"language"] : $this->object->getLanguage();
 
 2243                 foreach ($languages as $lang_key)
 
 2245                         $this->tpl->setCurrentBlock(
"language_selection");
 
 2246                         $this->tpl->setVariable(
"LANG", $this->lng->txt(
"lang_".$lang_key));
 
 2247                         $this->tpl->setVariable(
"LANGSHORT", $lang_key);
 
 2249                         if ($selected_lang == $lang_key)
 
 2251                                 $this->tpl->setVariable(
"SELECTED_LANG", 
"selected=\"selected\"");
 
 2254                         $this->tpl->parseCurrentBlock();
 
 2259                 $templates = $styleDefinition->getAllTemplates();
 
 2262                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]))
 
 2264                         $sknst = explode(
":", 
$_SESSION[
"error_post_vars"][
"Fobject"][
"skin_style"]);
 
 2266                         $selected_style = $sknst[1];
 
 2267                         $selected_skin = $sknst[0];
 
 2271                         $selected_style = $this->
object->prefs[
"style"];
 
 2272                         $selected_skin = $this->
object->skin;
 
 2275                 include(
"./Services/Style/classes/class.ilObjStyleSettings.php");
 
 2276                 if (count($templates) > 0 && is_array ($templates))
 
 2278                         foreach ($templates as $template)
 
 2283                                 $styleDef->startParsing();
 
 2284                                 $styles = $styleDef->getStyles();
 
 2285                                 foreach ($styles as $style)
 
 2292                                         $this->tpl->setCurrentBlock(
"selectskin");
 
 2294                                         if ($selected_skin == $template[
"id"] &&
 
 2295                                                 $selected_style == $style[
"id"])
 
 2297                                                 $this->tpl->setVariable(
"SKINSELECTED", 
"selected=\"selected\"");
 
 2300                                         $this->tpl->setVariable(
"SKINVALUE", $template[
"id"].
":".$style[
"id"]);
 
 2301                                         $this->tpl->setVariable(
"SKINOPTION", $styleDef->getTemplateName().
" / ".$style[
"name"]);
 
 2302                                         $this->tpl->parseCurrentBlock();
 
 2307                 $hits_options = array(2,10,15,20,30,40,50,100,9999);
 
 2309                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"]))
 
 2311                         $selected_option = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"hits_per_page"];
 
 2315                         $selected_option = $this->
object->prefs[
"hits_per_page"];
 
 2317                 foreach($hits_options as $hits_option)
 
 2319                         $this->tpl->setCurrentBlock(
"selecthits");
 
 2321                         if ($selected_option == $hits_option)
 
 2323                                 $this->tpl->setVariable(
"HITSSELECTED", 
"selected=\"selected\"");
 
 2326                         $this->tpl->setVariable(
"HITSVALUE", $hits_option);
 
 2328                         if ($hits_option == 9999)
 
 2330                                 $hits_option = $this->lng->txt(
"no_limit");
 
 2333                         $this->tpl->setVariable(
"HITSOPTION", $hits_option);
 
 2334                         $this->tpl->parseCurrentBlock();
 
 2339                 $users_online_options = array(
"y",
"associated",
"n");
 
 2341                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"]))
 
 2343                         $selected_option = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"show_users_online"];
 
 2347                         $selected_option = $this->
object->prefs[
"show_users_online"];
 
 2349                 foreach($users_online_options as $an_option)
 
 2351                         $this->tpl->setCurrentBlock(
"show_users_online");
 
 2353                         if ($selected_option == $an_option)
 
 2355                                 $this->tpl->setVariable(
"USERS_ONLINE_SELECTED", 
"selected=\"selected\"");
 
 2358                         $this->tpl->setVariable(
"USERS_ONLINE_VALUE", $an_option);
 
 2360                         $this->tpl->setVariable(
"USERS_ONLINE_OPTION", $this->lng->txt(
"users_online_show_".$an_option));
 
 2361                         $this->tpl->parseCurrentBlock();
 
 2366                 if (isset(
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"]))
 
 2368                         $hide_own_online_status = 
$_SESSION[
"error_post_vars"][
"Fobject"][
"hide_own_online_status"];
 
 2372                         $hide_own_online_status = ($this->
object->prefs[
"hide_own_online_status"] != 
'') ? $this->object->prefs[
"hide_own_online_status"] : 
"n";
 
 2374                 $this->tpl->setCurrentBlock(
"hide_own_online_status");
 
 2375                 $this->tpl->setVariable(
"TXT_HIDE_OWN_ONLINE_STATUS", $this->lng->txt(
"hide_own_online_status"));
 
 2376                 if ($hide_own_online_status == 
"y") {
 
 2377                         $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS", 
"checked=\"checked\"");
 
 2380                         $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS", 
"");
 
 2382                 $this->tpl->parseCurrentBlock();
 
 2386                 $this->tpl->setCurrentBlock(
"inform_user");
 
 2389                 $sendInfoMail = $ilUser->getPref(
'send_info_mails') == 
'y';
 
 2393                         $this->tpl->setVariable(
"SEND_MAIL", 
" checked=\"checked\"");
 
 2396                 $this->tpl->setVariable(
"TXT_INFORM_USER_MAIL", $this->lng->txt(
"inform_user_mail"));
 
 2397                 $this->tpl->parseCurrentBlock();
 
 2399                 $this->lng->loadLanguageModule(
'crs');
 
 2401                 $time_limit_unlimited = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] ?
 
 2402             $_SESSION[
"error_post_vars"][
"time_limit"][
"unlimited"] :
 
 2403             $this->
object->getTimeLimitUnlimited();
 
 2404         $time_limit_from = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"from"] ?
 
 2406             $this->
object->getTimeLimitFrom();
 
 2408         $time_limit_until = 
$_SESSION[
"error_post_vars"][
"time_limit"][
"until"] ?
 
 2410             $this->
object->getTimeLimitUntil();
 
 2412                 $this->tpl->setCurrentBlock(
"time_limit");
 
 2413         $this->tpl->setVariable(
"TXT_TIME_LIMIT", $this->lng->txt(
"time_limit"));
 
 2414         $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNLIMITED", $this->lng->txt(
"crs_unlimited"));
 
 2415         $this->tpl->setVariable(
"TXT_TIME_LIMIT_FROM", $this->lng->txt(
"crs_from"));
 
 2416         $this->tpl->setVariable(
"TXT_TIME_LIMIT_UNTIL", $this->lng->txt(
"crs_to"));
 
 2418         $this->tpl->setVariable(
"TIME_LIMIT_UNLIMITED",
ilUtil::formCheckbox($time_limit_unlimited,
"time_limit[unlimited]",1));
 
 2419         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[from][minute]",
 
 2420                                                                                      date(
"i",$time_limit_from)));
 
 2421         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[from][hour]",
 
 2422                                                                                      date(
"G",$time_limit_from)));
 
 2423         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_DAY",$this->
__getDateSelect(
"day",
"time_limit[from][day]",
 
 2424                                                                                      date(
"d",$time_limit_from)));
 
 2425         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_MONTH",$this->
__getDateSelect(
"month",
"time_limit[from][month]",
 
 2426                                                                                        date(
"m",$time_limit_from)));
 
 2427         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_FROM_YEAR",$this->
__getDateSelect(
"year",
"time_limit[from][year]",
 
 2428                                                                                       date(
"Y",$time_limit_from)));
 
 2429         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MINUTE",$this->
__getDateSelect(
"minute",
"time_limit[until][minute]",
 
 2430                                                                                      date(
"i",$time_limit_until)));
 
 2431         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_HOUR",$this->
__getDateSelect(
"hour",
"time_limit[until][hour]",
 
 2432                                                                                      date(
"G",$time_limit_until)));
 
 2433         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_DAY",$this->
__getDateSelect(
"day",
"time_limit[until][day]",
 
 2434                                                                                    date(
"d",$time_limit_until)));
 
 2435         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_MONTH",$this->
__getDateSelect(
"month",
"time_limit[until][month]",
 
 2436                                                                                      date(
"m",$time_limit_until)));
 
 2437         $this->tpl->setVariable(
"SELECT_TIME_LIMIT_UNTIL_YEAR",$this->
__getDateSelect(
"year",
"time_limit[until][year]",
 
 2438                                                                                     date(
"Y",$time_limit_until)));
 
 2439                 $this->tpl->parseCurrentBlock();
 
 2456                         !$rbacsystem->checkAccess(
'visible,read',$this->usrf_ref_id))
 
 2458                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2465                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 2467                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2471                 $userfile_input = $this->form_gui->getItemByPostVar(
"userfile");
 
 2473                 if ($_FILES[
"userfile"][
"tmp_name"] == 
"")
 
 2475                         if ($userfile_input->getDeletionFlag())
 
 2477                                 $this->
object->removeUserPicture();
 
 2481                 if ($_FILES[
"userfile"][
"size"] == 0)
 
 2488                         $image_dir = $webspace_dir.
"/usr_images";
 
 2489                         $store_file = 
"usr_".$this->object->getId().
".".
"jpg";
 
 2492                         $this->
object->setPref(
"profile_image", $store_file);
 
 2493                         $this->
object->update();
 
 2496                         $uploaded_file = $image_dir.
"/upload_".$this->
object->getId().
"pic";
 
 2498                                 $uploaded_file, 
false))
 
 2501                                 $this->ctrl->redirect($this, 
"showProfile");
 
 2503                         chmod($uploaded_file, 0770);
 
 2507                         $show_file  = 
"$image_dir/usr_".$this->object->getId().
".jpg";
 
 2508                         $thumb_file = 
"$image_dir/usr_".$this->object->getId().
"_small.jpg";
 
 2509                         $xthumb_file = 
"$image_dir/usr_".$this->object->getId().
"_xsmall.jpg";
 
 2510                         $xxthumb_file = 
"$image_dir/usr_".$this->object->getId().
"_xxsmall.jpg";
 
 2519                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:".$show_file);
 
 2520                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:".$thumb_file);
 
 2521                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:".$xthumb_file);
 
 2522                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:".$xxthumb_file);
 
 2526                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
 
 2527                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
 
 2528                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
 
 2529                                 ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
 
 2540                 $image_dir = $webspace_dir.
"/usr_images";
 
 2541                 $file = $image_dir.
"/usr_".$this->
object->getID().
".".
"jpg";
 
 2542                 $thumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_small.jpg";
 
 2543                 $xthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xsmall.jpg";
 
 2544                 $xxthumb_file = $image_dir.
"/usr_".$this->
object->getID().
"_xxsmall.jpg";
 
 2545                 $upload_file = $image_dir.
"/upload_".$this->
object->getID();
 
 2548                 $this->
object->setPref(
"profile_image", 
"");
 
 2549                 $this->
object->update();
 
 2552                 if (@is_file(
$file))
 
 2556                 if (@is_file($thumb_file))
 
 2558                         unlink($thumb_file);
 
 2560                 if (@is_file($xthumb_file))
 
 2562                         unlink($xthumb_file);
 
 2564                 if (@is_file($xxthumb_file))
 
 2566                         unlink($xxthumb_file);
 
 2568                 if (@is_file($upload_file))
 
 2570                         unlink($upload_file);
 
 2816                 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
 
 2819         $settings = $ilias->getAllSettings();
 
 2822                 if($this->usrf_ref_id == 
USER_FOLDER_ID and !$rbacsystem->checkAccess(
'visible,read,write',$this->usrf_ref_id))
 
 2824                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2831                         if(!$rbacsystem->checkAccess(
'cat_administrate_users',$this->object->getTimeLimitOwner()))
 
 2833                                 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_modify_user"),$this->ilias->error_obj->MESSAGE);
 
 2837                 foreach (
$_POST[
"Fobject"] as $key => $val)
 
 2843         foreach ($settings as $key => $val)
 
 2845             $field = substr($key,8);
 
 2852                                $require_keys[] = $field;
 
 2856                         $require_keys[] = $field;
 
 2862         foreach ($require_keys as $key => $val)
 
 2865             $system_fields = array(
"default_role");
 
 2866             if (!in_array($val, $system_fields))
 
 2868                 if (isset($settings[
"require_" . $val]) && $settings[
"require_" . $val])
 
 2870                     if (empty(
$_POST[
"Fobject"][$val]))
 
 2872                         $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") . 
": " .
 
 2873                                                                                                  $this->lng->txt($val),$this->ilias->error_obj->MESSAGE);
 
 2881                         $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields"),$this->ilias->error_obj->MESSAGE);
 
 2884                 if ($this->object->getLogin() != 
$_POST[
"Fobject"][
"login"] &&
 
 2887                         $this->ilias->raiseError($this->lng->txt(
"login_invalid"),$this->ilias->error_obj->MESSAGE);
 
 2893                         $this->ilias->raiseError($this->lng->txt(
"login_exists"),$this->ilias->error_obj->MESSAGE);
 
 2898                         if(
$_POST[
'Fobject'][
'passwd'] == 
"********" and
 
 2899                                 !strlen($this->object->getPasswd()))
 
 2901                 $this->ilias->raiseError($this->lng->txt(
"fill_out_all_required_fields") . 
": " .
 
 2902                                         $this->lng->txt(
'password'),$this->ilias->error_obj->MESSAGE);
 
 2905                         if (
$_POST[
"Fobject"][
"passwd"] != 
$_POST[
"Fobject"][
"passwd2"])
 
 2907                                 $this->ilias->raiseError($this->lng->txt(
"passwd_not_match"),$this->ilias->error_obj->MESSAGE);
 
 2913                                 $this->ilias->raiseError($this->lng->txt(
"passwd_invalid"),$this->ilias->error_obj->MESSAGE);
 
 2919                         $_POST[
'Fobject'][
'passwd'] = 
"********";
 
 2923                         if(!strlen(
$_POST[
'Fobject'][
'ext_account']))
 
 2925                                 $this->ilias->raiseError($this->lng->txt(
'ext_acccount_required'),$this->ilias->error_obj->MESSAGE);
 
 2928                 if(
$_POST[
'Fobject'][
'ext_account'] &&
 
 2931                         if($elogin != $this->object->getLogin())
 
 2933                                 $this->ilias->raiseError(
 
 2934                                                 sprintf($this->lng->txt(
"err_auth_ext_user_exists"),
 
 2935                                                         $_POST[
"Fobject"][
"ext_account"],
 
 2936                                                         $_POST[
'Fobject'][
'auth_mode'],
 
 2938                                                 $this->ilias->error_obj->MESSAGE);
 
 2944                 include_once (
'./Services/User/classes/class.ilObjUser.php');
 
 2950                         $this->ilias->raiseError($this->lng->txt(
"email_not_valid"),$this->ilias->error_obj->MESSAGE);
 
 2957                 if (!
$_POST[
"time_limit"][
"unlimited"] and
 
 2960             $this->ilias->raiseError($this->lng->txt(
"time_limit_not_valid"),$this->ilias->error_obj->MESSAGE);
 
 2963                 if(!$this->ilias->account->getTimeLimitUnlimited())
 
 2965                         if($start < $this->ilias->account->getTimeLimitFrom() or
 
 2966                            $end > $this->ilias->account->getTimeLimitUntil() or
 
 2967                            $_POST[
'time_limit'][
'unlimited'])
 
 2981                 $_POST[
'Fobject'][
'time_limit_owner'] = $this->
object->getTimeLimitOwner();
 
 2983                 $_POST[
'Fobject'][
'time_limit_unlimited'] = (int) 
$_POST[
'time_limit'][
'unlimited'];
 
 2987                 if(
$_POST[
'Fobject'][
'time_limit_unlimited'] != $this->object->getTimeLimitUnlimited() or
 
 2988                    $_POST[
'Fobject'][
'time_limit_from'] != $this->
object->getTimeLimitFrom() or
 
 2989                    $_POST[
'Fobject'][
'time_limit_until'] != $this->
object->getTimeLimitUntil())
 
 2991                         $_POST[
'Fobject'][
'time_limit_message'] = 0;
 
 2995                         $_POST[
'Fobject'][
'time_limit_message'] = $this->
object->getTimeLimitMessage();
 
 2998                 $this->
object->assignData(
$_POST[
"Fobject"]);
 
 2999                 $this->
object->setUserDefinedData(
$_POST[
'udf']);
 
 3003                         $this->
object->updateLogin(
$_POST[
'Fobject'][
'login']);
 
 3008                         $this->form_gui->setValuesByPost();
 
 3009                         return $tpl->setContent($this->form_gui->getHtml());                            
 
 3012                 $this->
object->setTitle($this->object->getFullname());
 
 3013                 $this->
object->setDescription($this->object->getEmail());
 
 3014                 $this->
object->setLanguage(
$_POST[
"Fobject"][
"language"]);
 
 3017                 $sknst = explode(
":", 
$_POST[
"Fobject"][
"skin_style"]);
 
 3019                 if ($this->object->getPref(
"style") != $sknst[1] ||
 
 3020                         $this->
object->getPref(
"skin") != $sknst[0])
 
 3022                         $this->
object->setPref(
"skin", $sknst[0]);
 
 3023                         $this->
object->setPref(
"style", $sknst[1]);
 
 3027                 $this->
object->setPref(
"hits_per_page", 
$_POST[
"Fobject"][
"hits_per_page"]);
 
 3029                 $this->
object->setPref(
"show_users_online", 
$_POST[
"Fobject"][
"show_users_online"]);
 
 3031                 if (
$_POST[
"Fobject"][
"hide_own_online_status"]) {
 
 3032                         $this->
object->setPref(
"hide_own_online_status", 
$_POST[
"Fobject"][
"hide_own_online_status"]);
 
 3035                         $this->
object->setPref(
"hide_own_online_status", 
"n");
 
 3038                 $this->update = $this->
object->update();
 
 3043                 $ilUser->setPref(
'send_info_mails', (
$_POST[
'send_mail'] == 
'y') ? 
'y' : 
'n');
 
 3044                 $ilUser->writePrefs();
 
 3048                 $msg = $this->lng->txt(
'saved_successfully').$mail_message;
 
 3053                 if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
 3055                         $this->ctrl->redirectByClass(
"ilobjuserfoldergui", 
"view");
 
 3059                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
 3072                 global $rbacsystem, $rbacadmin, $rbacreview;
 
 3074                 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
 
 3076                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
 
 3079                 $selected_roles = 
$_POST[
"role_id"] ? 
$_POST[
"role_id"] : array();
 
 3080                 $posted_roles = 
$_POST[
"role_id_ctrl"] ? 
$_POST[
"role_id_ctrl"] : array();
 
 3083                 if ($this->object->getId() == SYSTEM_USER_ID and in_array(SYSTEM_ROLE_ID, $posted_roles))
 
 3085                         array_push($selected_roles,SYSTEM_ROLE_ID);
 
 3088                 $global_roles_all = $rbacreview->getGlobalRoles();
 
 3089                 $assigned_roles_all = $rbacreview->assignedRoles($this->object->getId());
 
 3090                 $assigned_roles = array_intersect($assigned_roles_all,$posted_roles);
 
 3091                 $assigned_global_roles_all = array_intersect($assigned_roles_all,$global_roles_all);
 
 3092                 $assigned_global_roles = array_intersect($assigned_global_roles_all,$posted_roles);
 
 3093                 $posted_global_roles = array_intersect($selected_roles,$global_roles_all);
 
 3095                 if ((empty($selected_roles) and count($assigned_roles_all) == count($assigned_roles))
 
 3096                          or (empty($posted_global_roles) and count($assigned_global_roles_all) == count($assigned_global_roles)))
 
 3100             ilUtil::sendFailure($this->lng->txt(
"msg_min_one_role").
"<br/>".$this->lng->txt(
"action_aborted"),
true);
 
 3101             $this->ctrl->redirect($this,
'roleassignment');
 
 3104                 foreach (array_diff($assigned_roles,$selected_roles) as $role)
 
 3106                         $rbacadmin->deassignUser($role,$this->object->getId());
 
 3109                 foreach (array_diff($selected_roles,$assigned_roles) as $role)
 
 3111                         $rbacadmin->assignUser($role,$this->object->getId(),
false);
 
 3114         include_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
 3117                 $this->
object->update();
 
 3121                 if(strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui')
 
 3123                         $this->ctrl->redirect($this,
'roleassignment');
 
 3127                         $this->ctrl->redirectByClass(
'ilobjcategorygui',
'listUsers');
 
 3139                 global $rbacreview,$rbacsystem,
$ilUser, $ilTabs;
 
 3141                 $ilTabs->activateTab(
"role_assignment");
 
 3143                 if (!$rbacsystem->checkAccess(
"edit_roleassignment", $this->usrf_ref_id))
 
 3145                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_assign_role_to_user"),$this->ilias->error_obj->MESSAGE);
 
 3155                 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.usr_role_assignment.html',
'Services/User');
 
 3159                         $this->tpl->setCurrentBlock(
"filter");
 
 3160                         $this->tpl->setVariable(
"FILTER_TXT_FILTER",$this->lng->txt(
'filter'));
 
 3162                         $this->tpl->setVariable(
"FILTER_ACTION",$this->ctrl->getFormAction($this));
 
 3163                         $this->tpl->setVariable(
"FILTER_NAME",
'roleassignment');
 
 3164                         $this->tpl->setVariable(
"FILTER_VALUE",$this->lng->txt(
'apply_filter'));
 
 3165                         $this->tpl->parseCurrentBlock();
 
 3169                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3173                 $role_list = $rbacreview->getRolesByFilter(
$tab->filter[
"role_filter"],$this->object->getId());
 
 3174                 $assigned_roles = $rbacreview->assignedRoles($this->object->getId());
 
 3178         include_once (
'./Services/AccessControl/classes/class.ilObjRole.php');
 
 3181                 foreach ($role_list as $role)
 
 3184                         $rolf = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
 
 3187                         if ($rbacreview->isDeleted($rolf[0]))
 
 3195                         if ($this->tree->isInTree($rolf[0]))
 
 3197                 if ($rolf[0] == ROLE_FOLDER_ID)
 
 3199                     $path = $this->lng->txt(
"global");
 
 3203                                     $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 3216                                     $path = $tmpPath[count($tmpPath)-2][
"title"];
 
 3221                                 $path = 
"<b>Rolefolder ".$rolf[0].
" not found in tree! (Role ".$role[
"obj_id"].
")</b>";
 
 3227                         if (($this->object->getId() == SYSTEM_USER_ID and $role[
"obj_id"] == SYSTEM_ROLE_ID)
 
 3228                                 or (!in_array(SYSTEM_ROLE_ID,$rbacreview->assignedRoles($ilUser->getId())) and $role[
"obj_id"] == SYSTEM_ROLE_ID))
 
 3234                         if($role[
'obj_id'] == SYSTEM_ROLE_ID && !$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
 
 3236                                 include_once 
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
 
 3243             if (substr($role[
"title"],0,3) == 
"il_")
 
 3247                         $rolf_arr = $rbacreview->getFoldersAssignedToRole($role[
"obj_id"],
true);
 
 3248                         $rolf2 = $rolf_arr[0];
 
 3255                                 $parent_node = $this->tree->getParentNodeData($rolf2);
 
 3257                                 $role[
"description"] = $this->lng->txt(
"obj_".$parent_node[
"type"]).
" (#".$parent_node[
"obj_id"].
")";
 
 3260                         $role_ids[$counter] = $role[
"obj_id"];
 
 3262             $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"].
"\"/>";
 
 3263                         $this->ctrl->setParameterByClass(
"ilobjrolegui", 
"ref_id", $rolf[0]);
 
 3264                         $this->ctrl->setParameterByClass(
"ilobjrolegui", 
"obj_id", $role[
"obj_id"]);
 
 3265                         $result_set[$counter][] = $link = 
"<a href=\"".$this->ctrl->getLinkTargetByClass(
"ilobjrolegui", 
"perm").
"\">".
ilObjRole::_getTranslation($role[
"title"]).
"</a>";
 
 3267             $result_set[$counter][] = $role[
"description"];
 
 3270                 if ($role[
"role_type"] == 
"local") {
 
 3278                         foreach ($ref_ids as 
$ref_id) {}
 
 3280                         require_once(
"./Services/Link/classes/class.ilLink.php");
 
 3286                                 $result_set[$counter][] = 
$path;
 
 3290                         $records[] = array(
"path" => 
$path, 
"description" => $role[
"description"],
 
 3291                                 "context" => $context, 
"checkbox" => $checkbox,
 
 3292                                 "role" => $link, 
"title" => $title);
 
 3299                         $this->tpl->setVariable(
"ROLES_TABLE",
$tab->getHTML());
 
 3311                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3313                 $table_gui->writeFilterToSession();        
 
 3314                 $table_gui->resetOffset();                
 
 3323                 include_once(
"./Services/User/classes/class.ilRoleAssignmentTableGUI.php");
 
 3325                 $table_gui->resetOffset();                
 
 3326                 $table_gui->resetFilter();                
 
 3335                 for($i=0;$i<=60;$i++)
 
 3337                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3342                 for($i=0;$i<24;$i++)
 
 3344                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3349                 for($i=1;$i<32;$i++)
 
 3351                     $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 3356                 for($i=1;$i<13;$i++)
 
 3358                     $month[$i] = $i < 10 ? 
"0".$i : $i;
 
 3363                                 if($a_selected < date(
'Y',time()))
 
 3365                                         $start = $a_selected;
 
 3369                                         $start = date(
'Y',time());
 
 3372                 for($i = $start;$i < date(
"Y",time()) + 11;++$i)
 
 3382         return mktime($a_time_arr[
"hour"],
 
 3383                       $a_time_arr[
"minute"],
 
 3384                       $a_time_arr[
"second"],
 
 3385                       $a_time_arr[
"month"],
 
 3387                       $a_time_arr[
"year"]);
 
 3394                 $actions = array(
"assignSave"  => $this->lng->txt(
"change_assignment"));
 
 3397                 $tpl =& $tbl->getTemplateObject();
 
 3399                 $tpl->setCurrentBlock(
"tbl_form_header");
 
 3400                 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 3401                 $tpl->parseCurrentBlock();
 
 3403                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 3405                         $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 3408             foreach (
$actions as $name => $value)
 
 3410                                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3411                                 $tpl->setVariable(
"BTN_NAME",$name);
 
 3412                                 $tpl->setVariable(
"BTN_VALUE",$value);
 
 3413                                 $tpl->parseCurrentBlock();
 
 3416                         if (!empty($a_role_ids))
 
 3419                                 $tpl->setCurrentBlock(
"tbl_action_toggle_checkboxes");
 
 3420                                 $tpl->setVariable(
"JS_VARNAME",
"role_id");
 
 3422                                 $tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
 
 3423                                 $tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
 
 3424                                 $tpl->parseCurrentBlock();
 
 3427             $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 3430                 $this->ctrl->setParameter($this,
"cmd",
"roleassignment");
 
 3433                 $tbl->setTitle($this->lng->txt(
"edit_roleassignment"),
"icon_role.png",$this->lng->txt(
"roles"));
 
 3436                 $tbl->setHeaderNames(array(
"",$this->lng->txt(
"role"),$this->lng->txt(
"description"),$this->lng->txt(
"context")));
 
 3437                 $tbl->setHeaderVars(array(
"",
"title",
"description",
"context"),$this->ctrl->getParameterArray($this,
"",
false));
 
 3438                 $tbl->setColumnWidth(array(
"",
"30%",
"40%",
"30%"));
 
 3442                 $this->tpl->setVariable(
"ROLES_TABLE",$tbl->tpl->get());
 
 3449                 include_once 
"./Services/Table/classes/class.ilTableGUI.php";
 
 3459                         $order = 
$_GET[
"sort_by"] ? 
$_GET[
"sort_by"] : 
"title";
 
 3464                 $tbl->setOrderColumn($order);
 
 3465                 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 3466                 $tbl->setOffset(
$_GET[
"offset"]);
 
 3467                 $tbl->setLimit(
$_GET[
"limit"]);
 
 3468                 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 3469                 $tbl->setData($result_set);
 
 3479                 $action[0] = $this->lng->txt(
'assigned_roles');
 
 3480                 $action[1] = $this->lng->txt(
'all_roles');
 
 3481                 $action[2] = $this->lng->txt(
'all_global_roles');
 
 3482                 $action[3] = $this->lng->txt(
'all_local_roles');
 
 3483                 $action[4] = $this->lng->txt(
'internal_local_roles_only');
 
 3484                 $action[5] = $this->lng->txt(
'non_internal_local_roles_only');
 
 3503                 $ilLocator->clearItems();
 
 3505                 if (
$_GET[
"admin_mode"] == 
"settings")  
 
 3507                         $this->ctrl->setParameterByClass(
"ilobjsystemfoldergui",
 
 3508                                 "ref_id", SYSTEM_FOLDER_ID);
 
 3509                         $ilLocator->addItem($this->lng->txt(
"administration"),
 
 3510                                 $this->ctrl->getLinkTargetByClass(array(
"iladministrationgui", 
"ilobjsystemfoldergui"), 
""),
 
 3515                                 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
 
 3517                                         $this->ctrl->getLinkTargetByClass(
"ilobjuserfoldergui", 
"view"));
 
 3519                         elseif (
$_GET[
'ref_id'] == ROLE_FOLDER_ID)
 
 3521                                 $ilLocator->addItem($this->lng->txt(
"obj_".ilObject::_lookupType(
 
 3523                                         $this->ctrl->getLinkTargetByClass(
"ilobjrolefoldergui", 
"view"));
 
 3526                         if (
$_GET[
"obj_id"] > 0)
 
 3528                                 $ilLocator->addItem($this->object->getTitle(),
 
 3529                                         $this->ctrl->getLinkTarget($this, 
"view"));
 
 3546                 if(
$_POST[
'send_mail'] != 
'y')
 
 3550                 if(!strlen($this->object->getEmail()))
 
 3556                 $usr_lang = 
new ilLanguage($this->object->getLanguage());
 
 3558                 $usr_lang->loadLanguageModule(
'registration');
 
 3560                 include_once 
"Services/Mail/classes/class.ilMimeMail.php";
 
 3563                 $mmail->autoCheck(
false);
 
 3564                 $mmail->From($ilUser->getEmail());
 
 3565                 $mmail->To($this->object->getEmail());
 
 3568                 $subject = $usr_lang->txt(
"profile_changed");
 
 3572                 $body = ($usr_lang->txt(
"reg_mail_body_salutation").
" ".$this->
object->getFullname().
",\n\n");
 
 3574                 $date = $this->
object->getApproveDate();
 
 3576                 if((time() - strtotime($date)) < 10)
 
 3578                         $body .= ($usr_lang->txt(
'reg_mail_body_approve').
"\n\n");
 
 3582                         $body .= ($usr_lang->txt(
'reg_mail_body_profile_changed').
"\n\n");
 
 3586                 if(
$_POST[
'passwd'] != 
'********')
 
 3588                         $body .= $usr_lang->txt(
"reg_mail_body_text2").
"\n".
 
 3589                                 ILIAS_HTTP_PATH.
"/login.php?client_id=".$ilias->client_id.
"\n".
 
 3590                                 $usr_lang->txt(
"login").
": ".$this->
object->getLogin().
"\n".
 
 3591                                 $usr_lang->txt(
"passwd").
": ".
$_POST[
'passwd'].
"\n\n";
 
 3593                 $body .= ($usr_lang->txt(
"reg_mail_body_text3").
"\n");
 
 3594                 $body .= $this->
object->getProfileAsString($usr_lang);
 
 3596                 $mmail->Subject($subject);
 
 3597                 $mmail->Body($body);
 
 3601                 return "<br/>".$this->lng->txt(
"mail_sent");
 
 3612                 if($a_target == md5(
"usrdelown"))
 
 3614                         if($ilUser->getId() != ANONYMOUS_USER_ID &&
 
 3615                                 $ilUser->hasDeletionFlag())
 
 3617                                 $ilCtrl->setTargetScript(
"ilias.php");
 
 3618                                 $ilCtrl->initBaseClass(
"ilpersonaldesktopgui");
 
 3619                                 $ilCtrl->redirectByClass(array(
"ilpersonaldesktopgui", 
"ilpersonalsettingsgui"), 
"deleteOwnAccount3");                                          
 
 3621                         exit(
"This account is not flagged for deletion."); 
 
 3624                 if (substr($a_target, 0, 1) == 
"n")
 
 3629                 $_GET[
"cmd"] = 
"view";
 
 3630                 $_GET[
"user_id"] = (int) $a_target;
 
 3631                 $_GET[
"baseClass"] = 
"ilPublicUserProfileGUI";
 
 3632                 $_GET[
"cmdClass"] = 
"ilpublicuserprofilegui";
 
 3633                 include(
"ilias.php");
 
 3647                 $profileMaybeIncomplete = 
false;
 
 3649                 require_once 
'Services/User/classes/class.ilUserProfile.php';
 
 3653                         $elm = $this->form_gui->getItemByPostVar($fieldName);
 
 3655                         if( !$elm ) 
continue;            
 
 3657                         if( $elm->getRequired() )
 
 3659                                 $profileMaybeIncomplete = 
true;
 
 3662                                 $elm->setRequired( 
false );
 
 3666                 include_once 
'Services/User/classes/class.ilUserDefinedFields.php';
 
 3668                 foreach($user_defined_fields->getDefinitions() as $field_id => $definition)
 
 3670                         $elm = $this->form_gui->getItemByPostVar(
'udf_'.$definition[
'field_id']);
 
 3672                         if( !$elm ) 
continue;            
 
 3674                         if( $elm->getRequired() && $definition[
'changeable'] && $definition[
'required'] && $definition[
'visible'] )
 
 3676                                 $profileMaybeIncomplete = 
true;
 
 3679                                 $elm->setRequired( 
false );
 
 3683                 return $profileMaybeIncomplete;
 
 3689         protected function showAgreementTextAsynchObject()
 
 3691                 require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
 
 3696                 if($entity->getId())
 
 3698                         echo 
'<div style="max-width:640px;max-height:480px;overflow:auto;padding:5px">' . $entity->getText() . 
'</div>';
 
 3706         protected function showAcceptedTermsOfService()
 
 3711                 $agree_date = $this->form_gui->getItemByPostVar(
'agree_date');
 
 3712                 if($agree_date && $agree_date->getValue())
 
 3714                         $this->lng->loadLanguageModule(
'tos');
 
 3715                         require_once 
'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
 
 3720                         if($entity->getId())
 
 3722                                 $show_agreement_text = 
new ilCheckboxInputGUI($this->lng->txt(
'tos_show_signed_text'), 
'tos_show_signed_text');
 
 3725                                 $agreement_lang->
setValue($this->lng->txt(
'meta_l_' . $entity->getIso2LanguageCode()));
 
 3726                                 $show_agreement_text->addSubItem($agreement_lang);
 
 3728                                 $agreement_document = 
new ilNonEditableValueGUI($this->lng->txt(
'tos_agreement_document'), 
'', 
true);
 
 3730                                 require_once 
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
 
 3732                                 $action->setId(
'asl_content_accepted_content');
 
 3733                                 $action->setListTitle($this->lng->txt(
'tos_accepted_content'));
 
 3735                                 $action->setAsynch(
true);
 
 3736                                 $action->setAsynchUrl($this->ctrl->getLinkTarget($this, 
'showAgreementTextAsynch', 
'', 
true, 
false));
 
 3737                                 $agreement_document->setValue($entity->getSource().$action->getHtml());
 
 3739                                 $show_agreement_text->addSubItem($agreement_document);
 
 3740                                 $agree_date->addSubItem($show_agreement_text);
 
 3743                 else if($agree_date)
 
 3745                         $agree_date->setValue($this->lng->txt(
'tos_not_accepted_yet'));