4require_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
   35    public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = 
true)
 
   39        $ilCtrl = 
$DIC[
'ilCtrl'];
 
   53        $this->lng->loadLanguageModule(
'search');
 
   54        $this->lng->loadLanguageModule(
"user");
 
   55        $this->lng->loadLanguageModule(
'tos');
 
   56        $ilCtrl->saveParameter(
 
   68        $this->user_owner_id = $a_id;
 
   73        return $this->user_owner_id ? $this->user_owner_id : 
USER_FOLDER_ID;
 
   80        $ilTabs = 
$DIC[
'ilTabs'];
 
   83        $next_class = $this->ctrl->getNextClass($this);
 
   84        $cmd = $this->ctrl->getCmd();
 
   87        switch ($next_class) {
 
   88            case 'ilusertablegui':
 
   89                include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
   94                $u_table->initFilter();
 
   95                $this->ctrl->setReturn(
 
   99                $this->ctrl->forwardCommand($u_table);
 
  102            case 'ilpermissiongui':
 
  103                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  105                $ret = &$this->ctrl->forwardCommand($perm_gui);
 
  108            case 'ilrepositorysearchgui':
 
  110                if (!
$access->checkRbacOrPositionPermissionAccess(
 
  115                    $this->
ilias->raiseError(
 
  116                        $this->lng->txt(
"permission_denied"),
 
  117                        $this->ilias->error_obj->MESSAGE
 
  121                include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
 
  123                $user_search->setTitle($this->lng->txt(
"search_user_extended")); 
 
  124                $user_search->enableSearchableCheck(
false);
 
  125                $user_search->setUserLimitations(
false);
 
  126                $user_search->setCallback(
 
  128                    'searchResultHandler',
 
  131                $user_search->addUserAccessFilterCallable(array($this, 
"searchUserAccessFilterCallable"));
 
  132                $this->tabs_gui->setTabActive(
'search_user_extended');
 
  133                $this->ctrl->setReturn(
 
  137                $ret = &$this->ctrl->forwardCommand($user_search);
 
  140            case 'ilaccountcodesgui':
 
  141                $this->tabs_gui->setTabActive(
'settings');
 
  143                $ilTabs->activateSubTab(
"account_codes");
 
  144                include_once(
"./Services/User/classes/class.ilAccountCodesGUI.php");
 
  146                $this->ctrl->forwardCommand($acc);
 
  149            case 'ilcustomuserfieldsgui':
 
  150                $this->tabs_gui->setTabActive(
'settings');
 
  152                $ilTabs->activateSubTab(
"user_defined_fields");
 
  153                include_once(
"./Services/User/classes/class.ilCustomUserFieldsGUI.php");
 
  155                $this->ctrl->forwardCommand($cf);
 
  158            case 'iluserstartingpointgui':
 
  159                $this->tabs_gui->setTabActive(
'settings');
 
  161                $ilTabs->activateSubTab(
"starting_points");
 
  162                include_once(
"./Services/User/classes/class.ilUserStartingPointGUI.php");
 
  164                $this->ctrl->forwardCommand($cf);
 
  167            case 'iluserprofileinfosettingsgui':
 
  168                $this->tabs_gui->setTabActive(
'settings');
 
  170                $ilTabs->activateSubTab(
"user_profile_info");
 
  172                $this->ctrl->forwardCommand($ps);
 
  199            $this->object->getRefId()
 
  203            $this->
ilias->raiseError(
 
  204                $this->lng->txt(
"permission_denied"),
 
  205                $this->ilias->error_obj->MESSAGE
 
  209        include_once 
"Services/User/classes/class.ilUserLPTableGUI.php";
 
  213            $this->object->getRefId()
 
  216        $tpl->setContent($tbl->getHTML());
 
  225        include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  230        $utab->resetOffset();
 
  231        $utab->resetFilter();
 
  244        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  246        $ilCtrl->setParameterByClass(
 
  251        $ilCtrl->redirectByClass(
 
  252            array(
"iladministrationgui", 
"ilobjusergui"),
 
  264        $ilTabs = 
$DIC[
'ilTabs'];
 
  266        include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  271        $utab->resetOffset();
 
  272        $utab->writeFilterToSession();
 
  274        $ilTabs->activateTab(
"usrf");
 
  286        $ilToolbar = 
$DIC->toolbar();
 
  292        include_once 
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
 
  294        if (
$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId())
 
  295            || 
$rbacsystem->checkAccess(
'cat_administrate_users', $this->object->getRefId())) {
 
  297            $button->setCaption(
"usr_add");
 
  299                $this->ctrl->getLinkTarget(
 
  304            $ilToolbar->addButtonInstance($button);
 
  307            $button->setCaption(
"import_users");
 
  309                $this->ctrl->getLinkTarget(
 
  314            $ilToolbar->addButtonInstance($button);
 
  323            $access->checkRbacOrPositionPermissionAccess(
 
  329            $user_filter = 
$access->filterUserIdsByRbacOrPositionOfCurrentUser(
 
  338        if ((
int) 
$ilSetting->get(
'user_adm_alpha_nav')) {
 
  339            if (count($ilToolbar->getItems()) > 0) {
 
  340                $ilToolbar->addSeparator();
 
  344            include_once(
"./Services/Form/classes/class.ilAlphabetInputGUI.php");
 
  349            include_once(
"./Services/User/classes/class.ilObjUser.php");
 
  351            $ai->setParentCommand(
 
  355            $ai->setHighlighted(
$_GET[
"letter"]);
 
  356            $ilToolbar->addInputItem(
 
  362        include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  369        $utab->addFilterItemValue(
 
  375        $tpl->setContent($utab->getHTML());
 
  383        include_once 
'./Services/User/classes/class.ilUserAutoComplete.php';
 
  385        $auto->addUserAccessFilterCallable([$this, 
'filterUserIdsByRbacOrPositionOfCurrentUser']);
 
  386        $auto->setSearchFields(array(
'login', 
'firstname', 
'lastname', 
'email', 
'second_email'));
 
  387        $auto->enableFieldSearchableCheck(
false);
 
  388        $auto->setMoreLinkAvailable(
true);
 
  390        if (($_REQUEST[
'fetchall'])) {
 
  394        echo $auto->getList($_REQUEST[
'term']);
 
  406        return $access->filterUserIdsByRbacOrPositionOfCurrentUser(
 
  423        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  442        $operations = array();
 
  444        if ($this->actions == 
"") {
 
  446                "delete" => array(
"name" => 
"delete", 
"lng" => 
"delete"),
 
  447                "activate" => array(
"name" => 
"activate", 
"lng" => 
"activate"),
 
  448                "deactivate" => array(
"name" => 
"deactivate", 
"lng" => 
"deactivate"),
 
  449                "accessRestrict" => array(
"name" => 
"accessRestrict", 
"lng" => 
"accessRestrict"),
 
  450                "accessFree" => array(
"name" => 
"accessFree", 
"lng" => 
"accessFree"),
 
  451                "export" => array(
"name" => 
"export", 
"lng" => 
"export")
 
  456        foreach (
$d as $row) {
 
  459                $this->object->getRefId()
 
  461                $operations[] = $row;
 
  465        if (count($operations) > 0) {
 
  466            $select = 
"<select name=\"selectedAction\">\n";
 
  467            foreach ($operations as $val) {
 
  468                $select .= 
"<option value=\"" . $val[
"name"] . 
"\"";
 
  473                    $select .= 
" selected=\"selected\"";
 
  476                $select .= $this->lng->txt($val[
"lng"]);
 
  477                $select .= 
"</option>";
 
  479            $select .= 
"</select>";
 
  480            $this->tpl->setCurrentBlock(
"tbl_action_select");
 
  481            $this->tpl->setVariable(
 
  485            $this->tpl->setVariable(
 
  489            $this->tpl->setVariable(
 
  491                $this->lng->txt(
"submit")
 
  493            $this->tpl->parseCurrentBlock();
 
  496        if ($with_subobjects === 
true) {
 
  500        if ((count($operations) > 0) or $subobjs === 
true) {
 
  501            $this->tpl->setCurrentBlock(
"tbl_action_row");
 
  502            $this->tpl->setVariable(
 
  504                count($this->data[
"cols"])
 
  506            $this->tpl->setVariable(
 
  510            $this->tpl->setVariable(
 
  512                $this->lng->txt(
"actions")
 
  514            $this->tpl->parseCurrentBlock();
 
  529        $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
 
  533            $this->object->getRefId()
 
  539            foreach (
$d as $row) {
 
  541                if ($row[
"max"] > 0) {
 
  543                    for (
$i = 0; 
$i < count($this->data[
"ctrl"]); 
$i++) {
 
  544                        if ($this->data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
 
  549                if ($row[
"max"] == 
"" || $count < $row[
"max"]) {
 
  550                    $subobj[] = $row[
"name"];
 
  555        if (is_array($subobj)) {
 
  562            $this->tpl->setCurrentBlock(
"add_object");
 
  563            $this->tpl->setVariable(
 
  567            $this->tpl->setVariable(
 
  571            $this->tpl->setVariable(
 
  573                $this->lng->txt(
"add")
 
  575            $this->tpl->parseCurrentBlock();
 
  585        $this->ctrl->redirect(
 
  593        $this->ctrl->redirectByClass(
 
  594            'ilrepositorysearchgui',
 
  610            $this->
ilias->raiseError(
 
  611                $this->lng->txt(
"msg_no_perm_write"),
 
  612                $this->ilias->error_obj->WARNING
 
  632            $this->lng->txt(
"user_activated"),
 
  637            $this->ctrl->redirectByClass(
 
  638                'ilRepositorySearchGUI',
 
  642            $this->ctrl->redirect(
 
  660            $this->
ilias->raiseError(
 
  661                $this->lng->txt(
"msg_no_perm_write"),
 
  662                $this->ilias->error_obj->WARNING
 
  682            $this->lng->txt(
"user_deactivated"),
 
  687            $this->ctrl->redirectByClass(
 
  688                'ilRepositorySearchGUI',
 
  692            $this->ctrl->redirect(
 
  710            $this->
ilias->raiseError(
 
  711                $this->lng->txt(
"msg_no_perm_write"),
 
  712                $this->ilias->error_obj->WARNING
 
  722                $obj->setTimeLimitUnlimited(1);
 
  723                $obj->setTimeLimitFrom(
"");
 
  724                $obj->setTimeLimitUntil(
"");
 
  725                $obj->setTimeLimitMessage(0);
 
  732            $this->lng->txt(
"access_free_granted"),
 
  737            $this->ctrl->redirectByClass(
 
  738                'ilRepositorySearchGUI',
 
  742            $this->ctrl->redirect(
 
  754        $this->tpl->setContent($a_form->getHTML());
 
  772        include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  774        $form->setTitle($this->lng->txt(
"time_limit_add_time_limit_for_selected"));
 
  775        $form->setFormAction(
 
  776            $this->ctrl->getFormAction(
 
  778                "confirmaccessRestrict" 
  783            $this->lng->txt(
"access_from"),
 
  786        $from->setShowTime(
true);
 
  787        $from->setRequired(
true);
 
  788        $form->addItem($from);
 
  791            $this->lng->txt(
"access_until"),
 
  794        $to->setRequired(
true);
 
  795        $to->setShowTime(
true);
 
  798        $form->addCommandButton(
 
  799            "confirmaccessRestrict",
 
  800            $this->lng->txt(
"confirm")
 
  802        $form->addCommandButton(
 
  804            $this->lng->txt(
"cancel")
 
  807        foreach ($user_ids as $user_id) {
 
  809            $ufield->setValue($user_id);
 
  810            $form->addItem($ufield);
 
  814        if ($a_from_search || 
$_POST[
"frsrch"]) {
 
  817            $form->addItem($field);
 
  835        if (!$form->checkInput()) {
 
  839        $timefrom = $form->getItemByPostVar(
"from")->getDate()->get(
IL_CAL_UNIX);
 
  840        $timeuntil = $form->getItemByPostVar(
"to")->getDate()->get(
IL_CAL_UNIX);
 
  841        if ($timeuntil <= $timefrom) {
 
  847            $this->
ilias->raiseError(
 
  848                $this->lng->txt(
"msg_no_perm_write"),
 
  849                $this->ilias->error_obj->WARNING
 
  858                $obj->setTimeLimitUnlimited(0);
 
  859                $obj->setTimeLimitFrom($timefrom);
 
  860                $obj->setTimeLimitUntil($timeuntil);
 
  861                $obj->setTimeLimitMessage(0);
 
  866            $this->lng->txt(
"access_restricted"),
 
  871            $this->ctrl->redirectByClass(
 
  872                'ilRepositorySearchGUI',
 
  876            $this->ctrl->redirect(
 
  892        $ilCtrl = 
$DIC[
'ilCtrl'];
 
  898            $this->object->getRefId()
 
  901                $this->lng->txt(
"msg_no_perm_delete"),
 
  914            $this->
ilias->raiseError(
 
  915                $this->lng->txt(
"msg_no_delete_yourself"),
 
  916                $this->ilias->error_obj->WARNING
 
  921        foreach (
$_POST[
"id"] as $id) {
 
  923            $obj = &$this->
ilias->obj_factory->getInstanceByObjId($id);
 
  929            $this->lng->txt(
"user_deleted"),
 
  934            $this->ctrl->redirectByClass(
 
  935                'ilRepositorySearchGUI',
 
  939            $this->ctrl->redirect(
 
  955        if (
$_POST[
"select_cmd_all"]) {
 
  956            include_once(
"./Services/User/classes/class.ilUserTableGUI.php");
 
  969                $access->checkRbacOrPositionPermissionAccess(
 
  975                $filtered_users = 
$access->filterUserIdsByRbacOrPositionOfCurrentUser(
 
  982                $utab->addFilterItemValue(
 
  988            return $utab->getUserIdsForFilter();
 
  990            return $access->filterUserIdsByRbacOrPositionOfCurrentUser(
 
 1008        return $access->checkRbacOrPositionPermissionAccess(
 
 1022        $ilTabs = 
$DIC[
'ilTabs'];
 
 1026            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
'no_checkbox'));
 
 1031        if (!$a_from_search) {
 
 1032            $ilTabs->activateTab(
"obj_usrf");
 
 1034            $ilTabs->activateTab(
"search_user_extended");
 
 1055        if (!$a_from_search) {
 
 1056            $cancel = 
"cancelUserFolderAction";
 
 1058            $cancel = 
"cancelSearchAction";
 
 1062        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1064        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1065        $cgui->setHeaderText($this->lng->txt(
"info_" . $action . 
"_sure"));
 
 1067            $this->lng->txt(
"cancel"),
 
 1071            $this->lng->txt(
"confirm"),
 
 1075        if ($a_from_search) {
 
 1076            $cgui->addHiddenItem(
 
 1082        foreach ($user_ids as $id) {
 
 1087                $login = $this->lng->txt(
"never");
 
 1097            $caption = 
$user->getFullname() . 
" (" . 
$user->getLogin() . 
")" . 
", " .
 
 1098                $user->getEmail() . 
" -  " . $this->lng->txt(
"last_login") . 
": " . 
$login;
 
 1107        $this->tpl->setContent($cgui->getHTML());
 
 1117        $_POST[
"selectedAction"] = 
"delete";
 
 1118        if (in_array($this->
user->getId(), $this->getActionUserIds())) {
 
 1119            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
'msg_no_delete_yourself'));
 
 1131        $_POST[
"selectedAction"] = 
"activate";
 
 1140        $_POST[
"selectedAction"] = 
"deactivate";
 
 1141        if (in_array($this->
user->getId(), $this->getActionUserIds())) {
 
 1142            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
'no_deactivate_yourself'));
 
 1154        $_POST[
"selectedAction"] = 
"accessRestrict";
 
 1163        $_POST[
"selectedAction"] = 
"accessFree";
 
 1181        $ilCtrl = 
$DIC->ctrl();
 
 1184        $this->tabs_gui->clearTargets();
 
 1185        $this->tabs_gui->setBackTarget(
 
 1186            $this->lng->txt(
'usrf'),
 
 1187            $ilCtrl->getLinkTarget(
 
 1193            !
$rbacsystem->checkAccess(
'create_usr', $this->object->getRefId())
 
 1194            && !
$access->checkAccess(
'cat_administrate_users', 
'', $this->object->getRefId())
 
 1196            $this->tpl->setOnScreenMessage(
'failure', $this->lng->txt(
"permission_denied"));
 
 1200        $tpl->setContent($this->form->getHTML());
 
 1212        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 1214        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1218        include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 1220            $lng->txt(
'import_file'),
 
 1223        $fi->setSuffixes([
'xml']);
 
 1224        $fi->setRequired(
true);
 
 1225        $this->form->addItem($fi);
 
 1227        $this->form->addCommandButton(
 
 1228            'importUserRoleAssignment',
 
 1231        $this->form->addCommandButton(
 
 1236        $this->form->setTitle(
$lng->txt(
'import_users'));
 
 1237        $this->form->setFormAction($ilCtrl->getFormAction($this));
 
 1247        $filesystem = 
$DIC->filesystem()->storage();
 
 1251        if ($filesystem->hasDir($import_dir)) {
 
 1252            $filesystem->deleteDir($import_dir);
 
 1255        if (strtolower(
$_GET[
"baseClass"]) == 
'iladministrationgui') {
 
 1256            $this->ctrl->redirect(
 
 1261            $this->ctrl->redirectByClass(
 
 1280        $importDir = 
'user_import/usr_' . 
$ilUser->getId() . 
'_' . mb_substr(session_id(), 0, 8);
 
 1293        $ilCtrl = 
$DIC->ctrl();
 
 1294        $renderer = 
$DIC->ui()->renderer();
 
 1296        $this->tabs_gui->clearTargets();
 
 1297        $this->tabs_gui->setBackTarget(
 
 1298            $this->lng->txt(
'usrf'),
 
 1299            $ilCtrl->getLinkTarget(
 
 1306        if ($this->form->checkInput()) {
 
 1315            $this->form->setValuesByPost();
 
 1316            $tpl->setContent($this->form->getHtml());
 
 1327        $ui = 
$DIC->ui()->factory();
 
 1330            $xml_file_full_path,
 
 1333        $importParser->startParsing();
 
 1337        $xml_file_name = explode(
 
 1341        $roles_import_filename = $ui->input()->field()->text($this->lng->txt(
"import_file"))
 
 1342                                    ->withDisabled(
true)
 
 1343                                    ->withValue(end($xml_file_name));
 
 1345        $roles_import_count = $ui->input()->field()->numeric($this->lng->txt(
"num_users"))
 
 1346                                 ->withDisabled(
true)
 
 1347                                 ->withValue($importParser->getUserCount());
 
 1350            $xml_file_full_path,
 
 1353        $importParser->startParsing();
 
 1355        $roles = $importParser->getCollectedRoles();
 
 1361        foreach ($all_gl_roles as $obj_data) {
 
 1378                    $gl_roles[$obj_data[
"obj_id"]] = $obj_data[
"title"];
 
 1384        $got_globals = 
false;
 
 1385        $global_selects = [];
 
 1386        foreach ($roles as $role_id => $role) {
 
 1387            if ($role[
"type"] == 
"Global") {
 
 1388                if (!$got_globals) {
 
 1389                    $got_globals = 
true;
 
 1391                    $global_roles_assignment_info = $ui->input()->field()->text(
 
 1392                        $this->lng->txt(
"roles_of_import_global")
 
 1394                                                       ->withDisabled(
true)
 
 1395                                                       ->withValue($this->lng->txt(
"assign_global_role"));
 
 1399                $select_options = [];
 
 1400                foreach ($gl_roles as $key => $value) {
 
 1401                    $select_options[$role_id . 
"-" . $key] = $value;
 
 1405                $pre_select = array_search(
 
 1410                    switch ($role[
"name"]) {
 
 1411                        case "Administrator":    
 
 1412                            $pre_select = array_search(
 
 1419                            $pre_select = array_search(
 
 1426                            $pre_select = array_search(
 
 1433                            $pre_select = array_search(
 
 1440                            $pre_select = array_search(
 
 1448                $select = $ui->input()->field()->select(
 
 1452                             ->withValue($pre_select)
 
 1453                             ->withRequired(
true);
 
 1462        $got_locals = 
false;
 
 1463        foreach ($roles as $role_id => $role) {
 
 1464            if ($role[
"type"] == 
"Local") {
 
 1471            $local_roles_assignment_info = $ui->input()->field()->text($this->lng->txt(
"roles_of_import_local"))
 
 1472                                              ->withDisabled(
true)
 
 1473                                              ->withValue($this->lng->txt(
"assign_local_role"));
 
 1485                foreach ($roles as $role_id => $role) {
 
 1486                    if ($role[
"type"] == 
"Local") {
 
 1487                        $searchName = (substr(
 
 1491                        ) == 
'#') ? $role[
'name'] : 
'#' . $role[
'name'];
 
 1492                        $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
 
 1493                        foreach ($matching_role_ids as $mid) {
 
 1498                                $loc_roles[] = $mid;
 
 1507                $loc_roles = 
$rbacreview->getAssignableRolesInSubtree($this->object->getRefId());
 
 1512            $l_roles_mailbox_searcharray = array();
 
 1513            foreach ($loc_roles as $key => $loc_role) {
 
 1543                    if ($this->tree->isInTree($rolf[0])) {
 
 1546                        $tmpPath = $this->tree->getPathFull($rolf[0]);
 
 1547                        $tmpPath[] = $rolf[0];
 
 1549                        for (
$i = 1, 
$n = count($tmpPath) - 1; 
$i < 
$n; 
$i++) {
 
 1550                            if ($i < 3 || $i > 
$n - 3) {
 
 1551                                $path_array[] = $tmpPath[
$i][
'title'];
 
 1552                            } elseif (
$i == 3 || 
$i == 
$n - 3) {
 
 1553                                $path_array[] = 
'...';
 
 1556                            $isInSubtree |= $tmpPath[
$i][
'obj_id'] == $this->
object->getId();
 
 1561                            array_reverse($path_array)
 
 1564                        $path = 
"<b>Rolefolder " . $rolf[0] . 
" not found in tree! (Role " . $loc_role . 
")</b>";
 
 1566                    $roleMailboxAddress = (new \ilRoleMailboxAddress($loc_role))->value();
 
 1567                    $l_roles[$loc_role] = $roleMailboxAddress . 
', ' . $path;
 
 1571            natcasesort($l_roles);
 
 1572            $l_roles[
"ignore"] = $this->lng->txt(
"usrimport_ignore_role");
 
 1575            $local_selects = [];
 
 1576            foreach ($roles as $role_id => $role) {
 
 1577                if ($role[
"type"] == 
"Local") {
 
 1580                    $searchName = (substr(
 
 1584                    ) == 
'#') ? $role[
'name'] : 
'#' . $role[
'name'];
 
 1585                    $matching_role_ids = $roleMailboxSearch->searchRoleIdsByAddressString($searchName);
 
 1586                    $pre_select = count($matching_role_ids) == 1 ? $role_id . 
"-" . $matching_role_ids[0] : 
"ignore";
 
 1588                    $selectable_roles = [];
 
 1593                        $selectable_roles[
"ignore"] = $this->lng->txt(
"usrimport_ignore_role");
 
 1594                        foreach ($matching_role_ids as $id) {
 
 1595                            $selectable_roles[$role_id . 
"-" . $id] = $l_roles[$id];
 
 1598                        foreach ($l_roles as $local_role_id => $value) {
 
 1599                            if ($local_role_id !== 
"ignore") {
 
 1600                                $selectable_roles[$role_id . 
"-" . $local_role_id] = $value;
 
 1605                    if (count($selectable_roles) > 0) {
 
 1606                        $select = $ui->input()->field()
 
 1607                            ->select($role[
"name"], $selectable_roles)
 
 1608                            ->withRequired(
true);
 
 1609                        if (array_key_exists($pre_select, $selectable_roles)) {
 
 1610                            $select = $select->withValue($pre_select);
 
 1612                        $local_selects[] = $select;
 
 1623        $conflict_action_select = $ui->input()->field()->select(
 
 1624            $this->lng->txt(
"conflict_handling"),
 
 1629                $this->lng->txt(
"usrimport_conflict_handling_info")
 
 1633                                     ->withRequired(
true);
 
 1636        $this->lng->loadLanguageModule(
"mail");
 
 1638        if (trim($amail[
"body"]) != 
"" && trim($amail[
"subject"]) != 
"") {
 
 1639            $send_checkbox = $ui->input()->field()->checkbox($this->lng->txt(
"user_send_new_account_mail"))
 
 1642            $mail_section = $ui->input()->field()->section(
 
 1644                $this->lng->txt(
"mail_account_mail")
 
 1648        $file_info_section = $ui->input()->field()->section(
 
 1650                "filename" => $roles_import_filename,
 
 1651                "import_count" => $roles_import_count,
 
 1653            $this->lng->txt(
"file_info")
 
 1656        $form_action = 
$DIC->ctrl()->getFormActionByClass(
'ilObjUserFolderGui', 
'importUsers');
 
 1659            "file_info" => $file_info_section
 
 1662        if (!empty($global_selects)) {
 
 1663            $global_role_info_section = $ui->input()
 
 1665                ->section([$global_roles_assignment_info], $this->lng->txt(
"global_role_assignment"));
 
 1666            $global_role_selection_section = $ui->input()->field()->section($global_selects, 
"");
 
 1667            $form_elements[
"global_role_info"] = $global_role_info_section;
 
 1668            $form_elements[
"global_role_selection"] = $global_role_selection_section;
 
 1671        if (!empty($local_selects)) {
 
 1672            $local_role_info_section = $ui->input()->field()->section(
 
 1673                [$local_roles_assignment_info],
 
 1674                $this->lng->txt(
"local_role_assignment")
 
 1676            $local_role_selection_section = $ui->input()->field()->section(
 
 1681            $form_elements[
"local_role_info"] = $local_role_info_section;
 
 1682            $form_elements[
"local_role_selection"] = $local_role_selection_section;
 
 1685        $form_elements[
"conflict_action"] = $ui->input()->field()->section([$conflict_action_select], 
"");
 
 1687        if (!empty($mail_section)) {
 
 1688            $form_elements[
"send_mail"] = $mail_section;
 
 1691        return [$ui->input()->container()->form()->standard(
 
 1706        $upload = 
$DIC->upload();
 
 1708        $filesystem = 
$DIC->filesystem()->storage();
 
 1711        if (!$upload->hasBeenProcessed()) {
 
 1716        if ($filesystem->hasDir($import_dir)) {
 
 1717            $filesystem->deleteDir($import_dir);
 
 1719        $filesystem->createDir($import_dir);
 
 1721        foreach ($upload->getResults() as $single_file_upload) {
 
 1722            $file_name = $single_file_upload->getName();
 
 1723            $parts = pathinfo($file_name);
 
 1726            if ($single_file_upload->getStatus() != \
ILIAS\FileUpload\DTO\ProcessingStatus::OK) {
 
 1727                $filesystem->deleteDir($import_dir);
 
 1728                $this->
ilias->raiseError(
 
 1729                    $this->lng->txt(
"no_import_file_found"),
 
 1730                    $this->ilias->error_obj->MESSAGE
 
 1735            $upload->moveFilesTo(
 
 1737                \
ILIAS\FileUpload\Location::STORAGE
 
 1741            if ($single_file_upload->getMimeType() == 
"application/zip") {
 
 1744                    ) . 
"/" . $file_name;
 
 1748                $file_list = $filesystem->listContents($import_dir);
 
 1750                foreach ($file_list as $key => $a_file) {
 
 1755                        unset($file_list[$key]);
 
 1756                        $xml_file = $a_file->getPath();
 
 1762                foreach ($file_list as $a_file) {
 
 1763                    $filesystem->delete($a_file->getPath());
 
 1766                if (is_null($xml_file)) {
 
 1769                        "." . $parts[
"extension"]
 
 1771                    $xml_file = $import_dir . 
"/" . $subdir . 
"/" . $subdir . 
".xml";
 
 1775                $a = $filesystem->listContents($import_dir);
 
 1777                $xml_file = $file->getPath();
 
 1781            if (!$filesystem->has($xml_file)) {
 
 1782                $filesystem->deleteDir($import_dir);
 
 1783                $this->
ilias->raiseError(
 
 1784                    $this->lng->txt(
"no_xml_file_found_in_zip")
 
 1785                    . 
" " . $subdir . 
"/" . $subdir . 
".xml",
 
 1786                    $this->ilias->error_obj->MESSAGE
 
 1798        $filesystem = 
$DIC->filesystem()->storage();
 
 1801        switch ($importParser->getErrorLevel()) {
 
 1805                return $importParser->getProtocolAsHTML($this->lng->txt(
"verification_warning_log"));
 
 1807                $filesystem->deleteDir($import_dir);
 
 1808                $this->
ilias->raiseError(
 
 1809                    $this->lng->txt(
"verification_failed") . $importParser->getProtocolAsHTML(
 
 1810                        $this->lng->txt(
"verification_failure_log")
 
 1812                    $this->ilias->error_obj->MESSAGE
 
 1829        $filesystem = 
$DIC->filesystem()->storage();
 
 1832        $file_list = $filesystem->listContents($import_dir);
 
 1835        if (count($file_list) > 1) {
 
 1836            $filesystem->deleteDir($import_dir);
 
 1837            $this->
ilias->raiseError(
 
 1838                $this->lng->txt(
"usrimport_wrong_file_count"),
 
 1839                $this->ilias->error_obj->MESSAGE
 
 1841            if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
 1842                $this->ctrl->redirect(
 
 1847                $this->ctrl->redirectByClass(
 
 1853            $xml_file = $file_list[0]->getPath();
 
 1859        if (
$request->getMethod() == 
"POST") {
 
 1863            $this->
ilias->raiseError(
 
 1864                $this->lng->txt(
"usrimport_form_not_evaluabe"),
 
 1865                $this->ilias->error_obj->MESSAGE
 
 1867            if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
 1868                $this->ctrl->redirect(
 
 1873                $this->ctrl->redirectByClass(
 
 1880        $rule = 
$result[
"conflict_action"][0];
 
 1883        $local_role_selection = (array) (
$result[
'local_role_selection'] ?? []);
 
 1884        $global_role_selection = (array) (
$result[
'global_role_selection'] ?? []);
 
 1885        $roles = array_merge(
 
 1886            $local_role_selection,
 
 1887            $global_role_selection
 
 1890        $role_assignment = [];
 
 1891        foreach ($roles as $value) {
 
 1909        if (!empty($role_assignment)) {
 
 1912            foreach ($role_assignment as $role_id) {
 
 1913                if ($role_id != 
"") {
 
 1929                                $filesystem->deleteDir($import_dir);
 
 1930                                $this->
ilias->raiseError(
 
 1931                                    $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
 
 1932                                    $this->ilias->error_obj->MESSAGE
 
 1946                            $filesystem->deleteDir($import_dir);
 
 1947                            $this->
ilias->raiseError(
 
 1948                                $this->lng->txt(
"usrimport_with_specified_role_not_permitted"),
 
 1949                                $this->ilias->error_obj->MESSAGE
 
 1958        if (isset(
$result[
'send_mail'])) {
 
 1959            $importParser->setSendMail(
$result[
'send_mail'][0]);
 
 1962        $importParser->setRoleAssignment($role_assignment);
 
 1963        $importParser->startParsing();
 
 1966        $filesystem->deleteDir($import_dir);
 
 1968        switch ($importParser->getErrorLevel()) {
 
 1970                ilUtil::sendSuccess(
 
 1971                    $this->lng->txt(
"user_imported"),
 
 1976                ilUtil::sendSuccess(
 
 1977                    $this->lng->txt(
"user_imported_with_warnings") . $importParser->getProtocolAsHTML(
 
 1978                        $this->lng->txt(
"import_warning_log")
 
 1984                $this->
ilias->raiseError(
 
 1985                    $this->lng->txt(
"user_import_failed")
 
 1986                    . $importParser->getProtocolAsHTML($this->lng->txt(
"import_failure_log")),
 
 1987                    $this->ilias->error_obj->MESSAGE
 
 1992        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
 1993            $this->ctrl->redirect(
 
 1998            $this->ctrl->redirectByClass(
 
 2007        parent::hitsperpageObject();
 
 2023        include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
 2026        $show_blocking_time_in_days = 
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
 
 2027        $show_blocking_time_in_days = (float) $show_blocking_time_in_days;
 
 2029        include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 2033            'lua' => $aset->isLocalUserAdministrationEnabled(),
 
 2034            'lrua' => $aset->isUserAccessRestricted(),
 
 2035            'allow_change_loginname' => (bool) 
$ilSetting->get(
'allow_change_loginname'),
 
 2036            'create_history_loginname' => (bool) 
$ilSetting->get(
'create_history_loginname'),
 
 2037            'reuse_of_loginnames' => (bool) 
$ilSetting->get(
'reuse_of_loginnames'),
 
 2038            'loginname_change_blocking_time' => (float) $show_blocking_time_in_days,
 
 2039            'user_adm_alpha_nav' => (
int) 
$ilSetting->get(
'user_adm_alpha_nav'),
 
 2041            'user_reactivate_code' => (int) 
$ilSetting->get(
'user_reactivate_code'),
 
 2042            'user_own_account' => (int) 
$ilSetting->get(
'user_delete_own_account'),
 
 2043            'user_own_account_email' => 
$ilSetting->get(
'user_delete_own_account_email'),
 
 2044            'tos_withdrawal_usr_deletion' => (bool) 
$ilSetting->get(
'tos_withdrawal_usr_deletion'),
 
 2047                'session_handling_type',
 
 2050            'session_reminder_enabled' => 
$ilSetting->get(
'session_reminder_enabled'),
 
 2052                'session_max_count',
 
 2063            'session_max_idle_after_first_request' => 
$ilSetting->get(
 
 2064                'session_max_idle_after_first_request',
 
 2068            'login_max_attempts' => $security->getLoginMaxAttempts(),
 
 2069            'ps_prevent_simultaneous_logins' => (int) $security->isPreventionOfSimultaneousLoginsEnabled(),
 
 2070            'password_assistance' => (bool) 
$ilSetting->get(
"password_assistance"),
 
 2071            'letter_avatars' => (int) 
$ilSetting->get(
'letter_avatars'),
 
 2072            'password_change_on_first_login_enabled' => $security->isPasswordChangeOnFirstLoginEnabled() ? 1 : 0,
 
 2073            'password_max_age' => $security->getPasswordMaxAge()
 
 2077        $this->form->setValuesByArray(
 
 2080                $passwordPolicySettings,
 
 2081                [
'pw_policy_hash' => md5(
 
 2084                        $passwordPolicySettings
 
 2091        $this->tpl->setContent($this->form->getHTML());
 
 2123        if ($this->form->checkInput()) {
 
 2126            if (!strlen($this->form->getInput(
'loginname_change_blocking_time'))) {
 
 2128                $this->form->getItemByPostVar(
'loginname_change_blocking_time')
 
 2129                           ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
 
 2132            include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 2136            $security->setPasswordCharsAndNumbersEnabled((
bool) 
$_POST[
"password_chars_and_numbers_enabled"]);
 
 2137            $security->setPasswordSpecialCharsEnabled((
bool) 
$_POST[
"password_special_chars_enabled"]);
 
 2138            $security->setPasswordMinLength((
int) 
$_POST[
"password_min_length"]);
 
 2139            $security->setPasswordMaxLength((
int) 
$_POST[
"password_max_length"]);
 
 2140            $security->setPasswordNumberOfUppercaseChars((
int) 
$_POST[
'password_ucase_chars_num']);
 
 2141            $security->setPasswordNumberOfLowercaseChars((
int) 
$_POST[
'password_lowercase_chars_num']);
 
 2142            $security->setPasswordMaxAge((
int) 
$_POST[
"password_max_age"]);
 
 2143            $security->setLoginMaxAttempts((
int) 
$_POST[
"login_max_attempts"]);
 
 2144            $security->setPreventionOfSimultaneousLogins((
bool) 
$_POST[
'ps_prevent_simultaneous_logins']);
 
 2145            $security->setPasswordChangeOnFirstLoginEnabled((
bool) 
$_POST[
'password_change_on_first_login_enabled']);
 
 2146            $security->setPasswordMustNotContainLoginnameStatus((
int) 
$_POST[
'password_must_not_contain_loginame']);
 
 2148            if (!$security->validate($this->form)) {
 
 2155                include_once 
'./Services/User/classes/class.ilUserAccountSettings.php';
 
 2161                    'allow_change_loginname',
 
 2162                    (
int) $this->form->getInput(
'allow_change_loginname')
 
 2165                    'create_history_loginname',
 
 2166                    (
int) $this->form->getInput(
'create_history_loginname')
 
 2169                    'reuse_of_loginnames',
 
 2170                    (
int) $this->form->getInput(
'reuse_of_loginnames')
 
 2172                $save_blocking_time_in_seconds = (int) ($this->form->getInput(
 
 2173                    'loginname_change_blocking_time' 
 2176                    'loginname_change_blocking_time',
 
 2177                    (
int) $save_blocking_time_in_seconds
 
 2180                    'user_adm_alpha_nav',
 
 2181                    (
int) $this->form->getInput(
'user_adm_alpha_nav')
 
 2184                    'user_reactivate_code',
 
 2185                    (
int) $this->form->getInput(
'user_reactivate_code')
 
 2189                    'user_delete_own_account',
 
 2190                    (
int) $this->form->getInput(
'user_own_account')
 
 2193                    'user_delete_own_account_email',
 
 2194                    $this->form->getInput(
'user_own_account_email')
 
 2197                    'tos_withdrawal_usr_deletion',
 
 2198                    (
string) ((int) $this->form->getInput(
'tos_withdrawal_usr_deletion'))
 
 2202                    "password_assistance",
 
 2203                    $this->form->getInput(
"password_assistance")
 
 2208                    'session_handling_type',
 
 2209                    (
int) $this->form->getInput(
'session_handling_type')
 
 2214                        'session_reminder_enabled',
 
 2215                        $this->form->getInput(
'session_reminder_enabled')
 
 2217                } elseif ($this->form->getInput(
 
 2218                    'session_handling_type' 
 2220                    require_once 
'Services/Authentication/classes/class.ilSessionControl.php';
 
 2223                        'session_allow_client_maintenance',
 
 2228                        include_once 
"Services/Authentication/classes/class.ilSessionStatistics.php";
 
 2232                            'session_max_count',
 
 2233                            (
int) $this->form->getInput(
'session_max_count')
 
 2237                            (
int) $this->form->getInput(
'session_min_idle')
 
 2241                            (
int) $this->form->getInput(
'session_max_idle')
 
 2244                            'session_max_idle_after_first_request',
 
 2245                            (
int) $this->form->getInput(
'session_max_idle_after_first_request')
 
 2252                    (
int) $this->form->getInput(
'letter_avatars')
 
 2255                $requestPasswordReset = 
false;
 
 2256                if ($this->form->getInput(
'pw_policy_hash')) {
 
 2257                    $oldSettingsHash = $this->form->getInput(
'pw_policy_hash');
 
 2258                    $currentSettingsHash = md5(
 
 2264                    $requestPasswordReset = ($oldSettingsHash !== $currentSettingsHash);
 
 2267                if ($requestPasswordReset) {
 
 2268                    $this->ctrl->redirect(
 
 2270                        'askForUserPasswordReset' 
 2273                    ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
 
 2281        $this->form->setValuesByPost();
 
 2282        $this->tpl->setContent($this->form->getHTML());
 
 2291        $this->lng->loadLanguageModule(
'ps');
 
 2293        \ilUtil::sendSuccess(
 
 2294            $this->lng->txt(
'ps_passwd_policy_change_force_user_reset_succ'),
 
 2297        $this->ctrl->redirect(
 
 2308        $this->lng->loadLanguageModule(
'ps');
 
 2310        $confirmation = new \ilConfirmationGUI();
 
 2311        $confirmation->setFormAction(
 
 2312            $this->ctrl->getFormAction(
 
 2314                'askForUserPasswordReset' 
 2317        $confirmation->setHeaderText($this->lng->txt(
'ps_passwd_policy_changed_force_user_reset'));
 
 2318        $confirmation->setConfirm(
 
 2319            $this->lng->txt(
'yes'),
 
 2320            'forceUserPasswordReset' 
 2322        $confirmation->setCancel(
 
 2323            $this->lng->txt(
'no'),
 
 2327        $this->tpl->setContent($confirmation->getHTML());
 
 2341        $this->tabs_gui->setTabActive(
'settings');
 
 2342        $this->tabs_gui->setSubTabActive(
'general_settings');
 
 2344        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2346        $this->form->setFormAction(
 
 2347            $this->ctrl->getFormAction(
 
 2349                'saveGeneralSettings' 
 2353        $this->form->setTitle($this->lng->txt(
'general_settings'));
 
 2356            $this->lng->txt(
'enable_local_user_administration'),
 
 2359        $lua->setInfo($this->lng->txt(
'enable_local_user_administration_info'));
 
 2361        $this->form->addItem($lua);
 
 2364            $this->lng->txt(
'restrict_user_access'),
 
 2367        $lrua->setInfo($this->lng->txt(
'restrict_user_access_info'));
 
 2369        $this->form->addItem($lrua);
 
 2373            $this->lng->txt(
'user_adm_enable_alpha_nav'),
 
 2374            'user_adm_alpha_nav' 
 2378        $this->form->addItem($alph);
 
 2382            $this->lng->txt(
"user_account_code_setting"),
 
 2383            "user_reactivate_code" 
 2385        $code->setInfo($this->lng->txt(
'user_account_code_setting_info'));
 
 2386        $this->form->addItem($code);
 
 2390            $this->lng->txt(
"user_allow_delete_own_account"),
 
 2393        $this->form->addItem($own);
 
 2395            $this->lng->txt(
"user_delete_own_account_notification_email"),
 
 2396            "user_own_account_email" 
 2398        $own->addSubItem($own_email);
 
 2401            $this->lng->txt(
'tos_withdrawal_usr_deletion'),
 
 2402            'tos_withdrawal_usr_deletion' 
 2404        $withdrawalProvokesDeletion->setInfo($this->lng->txt(
'tos_withdrawal_usr_deletion_info'));
 
 2405        $withdrawalProvokesDeletion->setValue(
'1');
 
 2406        $this->form->addItem($withdrawalProvokesDeletion);
 
 2412            $this->lng->txt(
'sess_mode'),
 
 2413            'session_handling_type' 
 2418            $this->lng->txt(
'sess_fixed_duration'),
 
 2424            $this->lng->txt(
"session_reminder"),
 
 2425            "session_reminder_enabled" 
 2433            $this->lng->txt(
"session_reminder_info") . 
"<br />" .
 
 2435                $this->lng->txt(
'session_reminder_session_duration'),
 
 2439        $fixed->addSubItem($cb);
 
 2442        $ssettings->addOption($fixed);
 
 2446            $this->lng->txt(
'sess_load_dependent_session_handling'),
 
 2451        require_once(
'Services/Authentication/classes/class.ilSessionControl.php');
 
 2456            $this->lng->txt(
'session_max_count'),
 
 2459        $sub_ti->setMaxLength(5);
 
 2460        $sub_ti->setSize(5);
 
 2461        $sub_ti->setInfo($this->lng->txt(
'session_max_count_info'));
 
 2463            'session_allow_client_maintenance',
 
 2466            $sub_ti->setDisabled(
true);
 
 2468        $ldsh->addSubItem($sub_ti);
 
 2474            $this->lng->txt(
'session_min_idle'),
 
 2477        $sub_ti->setMaxLength(5);
 
 2478        $sub_ti->setSize(5);
 
 2479        $sub_ti->setInfo($this->lng->txt(
'session_min_idle_info'));
 
 2481            'session_allow_client_maintenance',
 
 2484            $sub_ti->setDisabled(
true);
 
 2486        $ldsh->addSubItem($sub_ti);
 
 2492            $this->lng->txt(
'session_max_idle'),
 
 2495        $sub_ti->setMaxLength(5);
 
 2496        $sub_ti->setSize(5);
 
 2497        $sub_ti->setInfo($this->lng->txt(
'session_max_idle_info'));
 
 2499            'session_allow_client_maintenance',
 
 2502            $sub_ti->setDisabled(
true);
 
 2504        $ldsh->addSubItem($sub_ti);
 
 2509            $this->lng->txt(
'session_max_idle_after_first_request'),
 
 2510            'session_max_idle_after_first_request' 
 2512        $sub_ti->setMaxLength(5);
 
 2513        $sub_ti->setSize(5);
 
 2514        $sub_ti->setInfo($this->lng->txt(
'session_max_idle_after_first_request_info'));
 
 2516            'session_allow_client_maintenance',
 
 2519            $sub_ti->setDisabled(
true);
 
 2521        $ldsh->addSubItem($sub_ti);
 
 2524        $ssettings->addOption($ldsh);
 
 2528            'session_allow_client_maintenance',
 
 2533            $this->form->addItem($ssettings);
 
 2538                $this->lng->txt(
'session_config'),
 
 2541            $ti->setValue($this->lng->txt(
'session_config_maintenance_disabled'));
 
 2542            $ssettings->setDisabled(
true);
 
 2543            $ti->addSubItem($ssettings);
 
 2544            $this->form->addItem($ti);
 
 2549        $this->lng->loadLanguageModule(
'ps');
 
 2552        $pass->setTitle($this->lng->txt(
'ps_password_settings'));
 
 2553        $this->form->addItem(
$pass);
 
 2556            $this->lng->txt(
'ps_password_change_on_first_login_enabled'),
 
 2557            'password_change_on_first_login_enabled' 
 2559        $check->setInfo($this->lng->txt(
'ps_password_change_on_first_login_enabled_info'));
 
 2560        $this->form->addItem($check);
 
 2562        include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 2565            $this->lng->txt(
'ps_password_must_not_contain_loginame'),
 
 2566            'password_must_not_contain_loginame' 
 2568        $check->setInfo($this->lng->txt(
'ps_password_must_not_contain_loginame_info'));
 
 2569        $this->form->addItem($check);
 
 2572            $this->lng->txt(
'ps_password_chars_and_numbers_enabled'),
 
 2573            'password_chars_and_numbers_enabled' 
 2576        $check->setInfo($this->lng->txt(
'ps_password_chars_and_numbers_enabled_info'));
 
 2577        $this->form->addItem($check);
 
 2580            $this->lng->txt(
'ps_password_special_chars_enabled'),
 
 2581            'password_special_chars_enabled' 
 2584        $check->setInfo($this->lng->txt(
'ps_password_special_chars_enabled_info'));
 
 2585        $this->form->addItem($check);
 
 2588            $this->lng->txt(
'ps_password_min_length'),
 
 2589            'password_min_length' 
 2591        $text->setInfo($this->lng->txt(
'ps_password_min_length_info'));
 
 2593        $text->setMaxLength(2);
 
 2594        $this->form->addItem($text);
 
 2597            $this->lng->txt(
'ps_password_max_length'),
 
 2598            'password_max_length' 
 2600        $text->setInfo($this->lng->txt(
'ps_password_max_length_info'));
 
 2602        $text->setMaxLength(3);
 
 2603        $this->form->addItem($text);
 
 2606            $this->lng->txt(
'ps_password_uppercase_chars_num'),
 
 2607            'password_ucase_chars_num' 
 2609        $text->setInfo($this->lng->txt(
'ps_password_uppercase_chars_num_info'));
 
 2610        $text->setMinValue(0);
 
 2612        $text->setMaxLength(3);
 
 2613        $this->form->addItem($text);
 
 2616            $this->lng->txt(
'ps_password_lowercase_chars_num'),
 
 2617            'password_lowercase_chars_num' 
 2619        $text->setInfo($this->lng->txt(
'ps_password_lowercase_chars_num_info'));
 
 2620        $text->setMinValue(0);
 
 2622        $text->setMaxLength(3);
 
 2623        $this->form->addItem($text);
 
 2626            $this->lng->txt(
'ps_password_max_age'),
 
 2629        $text->setInfo($this->lng->txt(
'ps_password_max_age_info'));
 
 2631        $text->setMaxLength(3);
 
 2632        $this->form->addItem($text);
 
 2636            $this->lng->txt(
"enable_password_assistance"),
 
 2637            "password_assistance" 
 2639        $cb->setInfo($this->lng->txt(
"password_assistance_info"));
 
 2640        $this->form->addItem($cb);
 
 2643        $pass->setTitle($this->lng->txt(
'ps_security_protection'));
 
 2644        $this->form->addItem(
$pass);
 
 2647            $this->lng->txt(
'ps_login_max_attempts'),
 
 2648            'login_max_attempts' 
 2650        $text->setInfo($this->lng->txt(
'ps_login_max_attempts_info'));
 
 2652        $text->setMaxLength(2);
 
 2653        $this->form->addItem($text);
 
 2657            $this->lng->txt(
'ps_prevent_simultaneous_logins'),
 
 2658            'ps_prevent_simultaneous_logins' 
 2660        $objCb->setValue(1);
 
 2661        $objCb->setInfo($this->lng->txt(
'ps_prevent_simultaneous_logins_info'));
 
 2662        $this->form->addItem($objCb);
 
 2665        $log->setTitle($this->lng->txt(
'loginname_settings'));
 
 2666        $this->form->addItem(
$log);
 
 2669            $this->lng->txt(
'allow_change_loginname'),
 
 2670            'allow_change_loginname' 
 2672        $chbChangeLogin->setValue(1);
 
 2673        $this->form->addItem($chbChangeLogin);
 
 2675            $this->lng->txt(
'history_loginname'),
 
 2676            'create_history_loginname' 
 2678        $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
 
 2679        $chbCreateHistory->setValue(1);
 
 2681        $chbChangeLogin->addSubItem($chbCreateHistory);
 
 2683            $this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
 
 2684            'reuse_of_loginnames' 
 2686        $chbReuseLoginnames->setValue(1);
 
 2687        $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
 
 2689        $chbChangeLogin->addSubItem($chbReuseLoginnames);
 
 2691            $this->lng->txt(
'loginname_change_blocking_time'),
 
 2692            'loginname_change_blocking_time' 
 2694        $chbChangeBlockingTime->allowDecimals(
true);
 
 2695        $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
 
 2696        $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
 
 2697        $chbChangeBlockingTime->setSize(10);
 
 2698        $chbChangeBlockingTime->setMaxLength(10);
 
 2699        $chbChangeLogin->addSubItem($chbChangeBlockingTime);
 
 2702            $this->lng->txt(
'usr_letter_avatars'),
 
 2706        $la->setInfo($this->lng->txt(
'usr_letter_avatars_info'));
 
 2707        $this->form->addItem($la);
 
 2709        $passwordPolicySettingsHash = new \ilHiddenInputGUI(
'pw_policy_hash');
 
 2710        $this->form->addItem($passwordPolicySettingsHash);
 
 2712        $this->form->addCommandButton(
 
 2713            'saveGeneralSettings',
 
 2714            $this->lng->txt(
'save')
 
 2732        $ilias = 
$DIC[
'ilias'];
 
 2733        $ilTabs = 
$DIC[
'ilTabs'];
 
 2735        include_once 
'Services/Search/classes/class.ilUserSearchOptions.php';
 
 2736        $lng->loadLanguageModule(
"administration");
 
 2737        $lng->loadLanguageModule(
"mail");
 
 2738        $lng->loadLanguageModule(
"chatroom");
 
 2740        $ilTabs->activateTab(
'settings');
 
 2741        $ilTabs->activateSubTab(
'standard_fields');
 
 2743        include_once(
"./Services/User/classes/class.ilUserFieldSettingsTableGUI.php");
 
 2748        if ($this->confirm_change) {
 
 2749            $tab->setConfirmChange();
 
 2751        $tpl->setContent($tab->getHTML());
 
 2761        include_once 
'Services/Search/classes/class.ilUserSearchOptions.php';
 
 2762        include_once 
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
 
 2766        $ilias = 
$DIC[
'ilias'];
 
 2772        include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
 2774        $up->skipField(
"username");
 
 2775        $field_properties = $up->getStandardFields();
 
 2776        $profile_fields = array_keys($field_properties);
 
 2779        foreach ($profile_fields as $field) {
 
 2780            if (
$_POST[
"chb"][
"required_" . $field] &&
 
 2781                !(
int) 
$_POST[
'chb'][
'visib_reg_' . $field]
 
 2793            $this->confirm_change = 1;
 
 2799        $fixed_required_fields = array(
 
 2806            "hits_per_page" => 0,
 
 2808            "hide_own_online_status" => 0
 
 2813        if ($privacy->enabledCourseExport() == 
true &&
 
 2814            $privacy->courseConfirmationRequired() == 
true &&
 
 2815            $action != 
"save") {
 
 2816            foreach ($profile_fields as $field) {
 
 2817                if (!$ilias->getSetting(
 
 2818                    "usr_settings_course_export_" . $field
 
 2819                ) && 
$_POST[
"chb"][
"course_export_" . $field] == 
"1") {
 
 2820                    #ilUtil::sendQuestion($this->lng->txt('confirm_message_course_export')); 
 2821                    #$this->confirm_change = 1; 
 2822                    #$this->settingsObject(); 
 2828        if ($action == 
'save') {
 
 2829            include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
 2833        foreach ($profile_fields as $field) {
 
 2838                    (
bool) 
$_POST[
'chb'][
'searchable_' . $field]
 
 2842            if (!
$_POST[
"chb"][
"visible_" . $field] && !$field_properties[$field][
"visible_hide"]) {
 
 2854            if (!
$_POST[
"chb"][
"changeable_" . $field] && !$field_properties[$field][
"changeable_hide"]) {
 
 2867            if ((
int) 
$_POST[
'chb'][
'visib_reg_' . $field] && !$field_properties[$field][
"visib_reg_hide"]) {
 
 2869                    'usr_settings_visib_reg_' . $field,
 
 2874                    'usr_settings_visib_reg_' . $field,
 
 2879            if ((
int) 
$_POST[
'chb'][
'visib_lua_' . $field]) {
 
 2881                    'usr_settings_visib_lua_' . $field,
 
 2886                    'usr_settings_visib_lua_' . $field,
 
 2891            if ((
int) 
$_POST[
'chb'][
'changeable_lua_' . $field]) {
 
 2893                    'usr_settings_changeable_lua_' . $field,
 
 2898                    'usr_settings_changeable_lua_' . $field,
 
 2903            if (
$_POST[
"chb"][
"export_" . $field] && !$field_properties[$field][
"export_hide"]) {
 
 2905                    "usr_settings_export_" . $field,
 
 2909                $ilias->deleteSetting(
"usr_settings_export_" . $field);
 
 2913            if (
$_POST[
"chb"][
"course_export_" . $field] && !$field_properties[$field][
"course_export_hide"]) {
 
 2915                    "usr_settings_course_export_" . $field,
 
 2919                $ilias->deleteSetting(
"usr_settings_course_export_" . $field);
 
 2923            if (
$_POST[
"chb"][
"group_export_" . $field] && !$field_properties[$field][
"group_export_hide"]) {
 
 2925                    "usr_settings_group_export_" . $field,
 
 2929                $ilias->deleteSetting(
"usr_settings_group_export_" . $field);
 
 2932            $is_fixed = array_key_exists(
 
 2934                $fixed_required_fields
 
 2936            if ($is_fixed && $fixed_required_fields[$field] || !$is_fixed && 
$_POST[
"chb"][
"required_" . $field]) {
 
 2938                    "require_" . $field,
 
 2942                $ilias->deleteSetting(
"require_" . $field);
 
 2946        if (
$_POST[
"select"][
"default_hits_per_page"]) {
 
 2949                $_POST[
"select"][
"default_hits_per_page"]
 
 2958        if (
$_POST[
"chb"][
"export_preferences"]) {
 
 2960                "usr_settings_export_preferences",
 
 2961                $_POST[
"chb"][
"export_preferences"]
 
 2964            $ilias->deleteSetting(
"usr_settings_export_preferences");
 
 2968            'mail_incoming_mail',
 
 2969            (
int) 
$_POST[
'select'][
'default_mail_incoming_mail']
 
 2972            'chat_osc_accept_msg',
 
 2976            'bs_allow_to_contact_me',
 
 2980            'hide_own_online_status',
 
 2984        ilUtil::sendSuccess($this->lng->txt(
"usr_settings_saved"));
 
 2993        $action[-1] = $this->lng->txt(
'all_users');
 
 2994        $action[1] = $this->lng->txt(
'usr_active_only');
 
 2995        $action[0] = $this->lng->txt(
'usr_inactive_only');
 
 2996        $action[2] = $this->lng->txt(
'usr_limited_access_only');
 
 2997        $action[3] = $this->lng->txt(
'usr_without_courses');
 
 2998        $action[4] = $this->lng->txt(
'usr_filter_lastlogin');
 
 2999        $action[5] = $this->lng->txt(
"usr_filter_coursemember");
 
 3000        $action[6] = $this->lng->txt(
"usr_filter_groupmember");
 
 3001        $action[7] = $this->lng->txt(
"usr_filter_role");
 
 3018        if (!isset(
$_POST[
"file"])) {
 
 3019            $this->
ilias->raiseError(
 
 3020                $this->lng->txt(
"no_checkbox"),
 
 3021                $this->ilias->error_obj->MESSAGE
 
 3025        if (count(
$_POST[
"file"]) > 1) {
 
 3026            $this->
ilias->raiseError(
 
 3027                $this->lng->txt(
"select_max_one_item"),
 
 3028                $this->ilias->error_obj->MESSAGE
 
 3032        $file = basename(
$_POST[
"file"][0]);
 
 3034        $export_dir = $this->
object->getExportDirectory();
 
 3036            $export_dir . 
"/" . $file,
 
 3046        if (!isset(
$_POST[
"file"])) {
 
 3047            $this->
ilias->raiseError(
 
 3048                $this->lng->txt(
"no_checkbox"),
 
 3049                $this->ilias->error_obj->MESSAGE
 
 3054        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 3056        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 3057        $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 3059            $this->lng->txt(
"cancel"),
 
 3060            "cancelDeleteExportFile" 
 3063            $this->lng->txt(
"confirm"),
 
 3068        foreach (
$_POST[
"file"] as $file) {
 
 3074                $this->lng->txt(
"obj_usrf")
 
 3078        $this->tpl->setContent($cgui->getHTML());
 
 3086        $this->ctrl->redirectByClass(
 
 3087            "ilobjuserfoldergui",
 
 3097        $export_dir = $this->
object->getExportDirectory();
 
 3098        foreach (
$_POST[
"file"] as $file) {
 
 3099            $file = basename($file);
 
 3101            $exp_file = $export_dir . 
"/" . $file;
 
 3102            if (@is_file($exp_file)) {
 
 3106        $this->ctrl->redirectByClass(
 
 3107            "ilobjuserfoldergui",
 
 3119        $this->
object->buildExportFile(
$_POST[
"export_type"]);
 
 3120        $this->ctrl->redirect(
 
 3136        $button->setCaption(
'create_export_file');
 
 3137        $button->setCommand(
'performExport');
 
 3139        $toolbar->setFormAction($this->ctrl->getFormAction($this));
 
 3141        $export_types = array(
 
 3142            "userfolder_export_excel_x86",
 
 3143            "userfolder_export_csv",
 
 3144            "userfolder_export_xml" 
 3147        foreach ($export_types as 
$type) {
 
 3150        $type_selection = new \ilSelectInputGUI(
 
 3154        $type_selection->setOptions($options);
 
 3160        $toolbar->addButtonInstance($button);
 
 3162        $table = new \ilUserExportFileTableGUI(
 
 3167        $table->parse($this->object->getExportFiles());
 
 3169        $this->tpl->setContent($table->getHTML());
 
 3177        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3179        $lng->loadLanguageModule(
"meta");
 
 3180        $lng->loadLanguageModule(
"mail");
 
 3182        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3184        $form->setFormAction($ilCtrl->getFormAction($this));
 
 3187        $form->setTitle(
$lng->txt(
"user_new_account_mail"));
 
 3188        $form->setDescription(
$lng->txt(
"user_new_account_mail_desc"));
 
 3190        $langs = 
$lng->getInstalledLanguages();
 
 3191        foreach ($langs as $lang_key) {
 
 3192            $amail = $this->
object->_lookupNewAccountMail($lang_key);
 
 3194            $title = 
$lng->txt(
"meta_l_" . $lang_key);
 
 3195            if ($lang_key == 
$lng->getDefaultLanguage()) {
 
 3196                $title .= 
" (" . 
$lng->txt(
"default") . 
")";
 
 3200            $header->setTitle($title);
 
 3201            $form->addItem($header);
 
 3204                $lng->txt(
"subject"),
 
 3205                "subject_" . $lang_key
 
 3208            $subj->setValue($amail[
"subject"]);
 
 3209            $form->addItem($subj);
 
 3212                $lng->txt(
"mail_salutation_general"),
 
 3213                "sal_g_" . $lang_key
 
 3216            $salg->setValue($amail[
"sal_g"]);
 
 3217            $form->addItem($salg);
 
 3220                $lng->txt(
"mail_salutation_female"),
 
 3221                "sal_f_" . $lang_key
 
 3224            $salf->setValue($amail[
"sal_f"]);
 
 3225            $form->addItem($salf);
 
 3228                $lng->txt(
"mail_salutation_male"),
 
 3229                "sal_m_" . $lang_key
 
 3232            $salm->setValue($amail[
"sal_m"]);
 
 3233            $form->addItem($salm);
 
 3236                $lng->txt(
"message_content"),
 
 3240            $body->setValue($amail[
"body"]);
 
 3242            $body->setCols(100);
 
 3243            $form->addItem($body);
 
 3246                $lng->txt(
"attachment"),
 
 3249            $att->setAllowDeletion(
true);
 
 3250            if ($amail[
"att_file"]) {
 
 3251                $att->setValue($amail[
"att_file"]);
 
 3253            $form->addItem($att);
 
 3256        $form->addCommandButton(
 
 3257            "saveNewAccountMail",
 
 3260        $form->addCommandButton(
 
 3261            "cancelNewAccountMail",
 
 3278        $this->tabs_gui->setTabActive(
'settings');
 
 3279        $this->tabs_gui->setSubTabActive(
'user_new_account_mail');
 
 3284            'tpl.usrf_new_account_mail.html',
 
 3297            "TXT_USE_PLACEHOLDERS",
 
 3298            $lng->txt(
"mail_nacc_use_placeholder")
 
 3301            "TXT_MAIL_SALUTATION",
 
 3302            $lng->txt(
"mail_nacc_salutation")
 
 3306            $lng->txt(
"firstname")
 
 3310            $lng->txt(
"lastname")
 
 3318            $lng->txt(
"mail_nacc_login")
 
 3322            $lng->txt(
"password")
 
 3325            "TXT_PASSWORD_BLOCK",
 
 3326            $lng->txt(
"mail_nacc_pw_block")
 
 3329            "TXT_NOPASSWORD_BLOCK",
 
 3330            $lng->txt(
"mail_nacc_no_pw_block")
 
 3334            $lng->txt(
"mail_nacc_admin_mail")
 
 3338            $lng->txt(
"mail_nacc_ilias_url")
 
 3342            $lng->txt(
"mail_nacc_client_name")
 
 3346            $lng->txt(
"mail_nacc_target")
 
 3350            $lng->txt(
"mail_nacc_target_title")
 
 3354            $lng->txt(
"mail_nacc_target_type")
 
 3358            $lng->txt(
"mail_nacc_target_block")
 
 3362            $lng->txt(
"mail_nacc_if_timelimit")
 
 3366            $lng->txt(
"mail_nacc_timelimit")
 
 3369        $this->tpl->setContent($ftpl->get());
 
 3374        $this->ctrl->redirect(
 
 3386        $langs = 
$lng->getInstalledLanguages();
 
 3387        foreach ($langs as $lang_key) {
 
 3388            $this->
object->_writeNewAccountMail(
 
 3397            if ($_FILES[
"att_" . $lang_key][
"tmp_name"]) {
 
 3398                $this->
object->_updateAccountMailAttachment(
 
 3400                    $_FILES[
"att_" . $lang_key][
"tmp_name"],
 
 3401                    $_FILES[
"att_" . $lang_key][
"name"]
 
 3405            if (
$_POST[
"att_" . $lang_key . 
"_delete"]) {
 
 3406                $this->
object->_deleteAccountMailAttachment($lang_key);
 
 3410        ilUtil::sendSuccess(
 
 3411            $this->lng->txt(
"msg_obj_modified"),
 
 3414        $this->ctrl->redirect(
 
 3432        include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
 3441            $this->object->getRefId()
 
 3443            $this->tabs_gui->addTarget(
 
 3445                $this->ctrl->getLinkTarget(
 
 3449                array(
"view", 
"delete", 
"resetFilter", 
"userAction", 
""),
 
 3455        if (
$access->checkRbacOrPositionPermissionAccess(
 
 3460            $this->tabs_gui->addTarget(
 
 3461                "search_user_extended",
 
 3462                $this->ctrl->getLinkTargetByClass(
 
 3463                    'ilRepositorySearchGUI',
 
 3467                "ilrepositorysearchgui",
 
 3474            $this->object->getRefId()
 
 3476            $this->tabs_gui->addTarget(
 
 3478                $this->ctrl->getLinkTarget(
 
 3482                array(
'askForUserPasswordReset',
 
 3483                      'forceUserPasswordReset',
 
 3486                      'listUserDefinedField',
 
 3491            $this->tabs_gui->addTarget(
 
 3493                $this->ctrl->getLinkTarget(
 
 3505            $this->object->getRefId()
 
 3507            $this->tabs_gui->addTarget(
 
 3509                $this->ctrl->getLinkTargetByClass(
 
 3510                    array(get_class($this), 
'ilpermissiongui'),
 
 3513                array(
"perm", 
"info", 
"owner"),
 
 3531                $this->tabs_gui->addSubTabTarget(
 
 3533                    $this->ctrl->getLinkTarget(
 
 3540                $this->tabs_gui->addSubTabTarget(
 
 3542                    $this->ctrl->getLinkTarget(
 
 3546                    array(
"settings", 
"saveGlobalUserSettings"),
 
 3549                $this->tabs_gui->addSubTabTarget(
 
 3550                    "user_defined_fields",
 
 3551                    $this->ctrl->getLinkTargetByClass(
 
 3552                        "ilcustomuserfieldsgui",
 
 3553                        "listUserDefinedFields" 
 3555                    "listUserDefinedFields",
 
 3558                $this->tabs_gui->addSubTabTarget(
 
 3559                    "user_new_account_mail",
 
 3560                    $this->ctrl->getLinkTarget(
 
 3568                $this->tabs_gui->addSubTabTarget(
 
 3570                    $this->ctrl->getLinkTargetByClass(
 
 3571                        "iluserstartingpointgui",
 
 3578                $this->tabs_gui->addSubTabTarget(
 
 3579                    "user_profile_info",
 
 3580                    $this->ctrl->getLinkTargetByClass(
 
 3581                        "ilUserProfileInfoSettingsGUI",
 
 3585                    "ilUserProfileInfoSettingsGUI" 
 3588                #$this->tabs_gui->addSubTab("account_codes", $this->lng->txt("user_account_codes"),
 
 3589                #                                                        $this->ctrl->getLinkTargetByClass("ilaccountcodesgui"));
 
 3600        $show_blocking_time_in_days = (int) 
$ilSetting->get(
'loginname_change_blocking_time') / 86400;
 
 3603        $this->loginSettingsForm->setValuesByArray(
 
 3605                'allow_change_loginname' => (
bool) 
$ilSetting->get(
'allow_change_loginname'),
 
 3606                'create_history_loginname' => (
bool) 
$ilSetting->get(
'create_history_loginname'),
 
 3607                'reuse_of_loginnames' => (
bool) 
$ilSetting->get(
'reuse_of_loginnames'),
 
 3608                'loginname_change_blocking_time' => (
float) $show_blocking_time_in_days
 
 3612        $this->tpl->setVariable(
 
 3614            $this->loginSettingsForm->getHTML()
 
 3621        $this->tabs_gui->setTabActive(
'settings');
 
 3622        $this->tabs_gui->setSubTabActive(
'loginname_settings');
 
 3624        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3627            $this->ctrl->getFormAction(
 
 3629                'saveLoginnameSettings' 
 3632        $this->loginSettingsForm->setTitle($this->lng->txt(
'loginname_settings'));
 
 3635            $this->lng->txt(
'allow_change_loginname'),
 
 3636            'allow_change_loginname' 
 3638        $chbChangeLogin->setValue(1);
 
 3639        $this->loginSettingsForm->addItem($chbChangeLogin);
 
 3641            $this->lng->txt(
'history_loginname'),
 
 3642            'create_history_loginname' 
 3644        $chbCreateHistory->setInfo($this->lng->txt(
'loginname_history_info'));
 
 3645        $chbCreateHistory->setValue(1);
 
 3646        $chbChangeLogin->addSubItem($chbCreateHistory);
 
 3648            $this->lng->txt(
'reuse_of_loginnames_contained_in_history'),
 
 3649            'reuse_of_loginnames' 
 3651        $chbReuseLoginnames->setValue(1);
 
 3652        $chbReuseLoginnames->setInfo($this->lng->txt(
'reuse_of_loginnames_contained_in_history_info'));
 
 3653        $chbChangeLogin->addSubItem($chbReuseLoginnames);
 
 3655            $this->lng->txt(
'loginname_change_blocking_time'),
 
 3656            'loginname_change_blocking_time' 
 3658        $chbChangeBlockingTime->allowDecimals(
true);
 
 3659        $chbChangeBlockingTime->setSuffix($this->lng->txt(
'days'));
 
 3660        $chbChangeBlockingTime->setInfo($this->lng->txt(
'loginname_change_blocking_time_info'));
 
 3661        $chbChangeBlockingTime->setSize(10);
 
 3662        $chbChangeBlockingTime->setMaxLength(10);
 
 3663        $chbChangeLogin->addSubItem($chbChangeBlockingTime);
 
 3665        $this->loginSettingsForm->addCommandButton(
 
 3666            'saveLoginnameSettings',
 
 3667            $this->lng->txt(
'save')
 
 3679        if ($this->loginSettingsForm->checkInput()) {
 
 3682            if (!strlen($this->loginSettingsForm->getInput(
'loginname_change_blocking_time'))) {
 
 3684                $this->loginSettingsForm->getItemByPostVar(
'loginname_change_blocking_time')
 
 3685                                        ->setAlert($this->lng->txt(
'loginname_change_blocking_time_invalidity_info'));
 
 3689                $save_blocking_time_in_seconds = (int) $this->loginSettingsForm->getInput(
 
 3690                    'loginname_change_blocking_time' 
 3694                    'allow_change_loginname',
 
 3695                    (
int) $this->loginSettingsForm->getInput(
'allow_change_loginname')
 
 3698                    'create_history_loginname',
 
 3699                    (
int) $this->loginSettingsForm->getInput(
'create_history_loginname')
 
 3702                    'reuse_of_loginnames',
 
 3703                    (
int) $this->loginSettingsForm->getInput(
'reuse_of_loginnames')
 
 3706                    'loginname_change_blocking_time',
 
 3707                    (
int) $save_blocking_time_in_seconds
 
 3710                ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'));
 
 3717        $this->loginSettingsForm->setValuesByPost();
 
 3719        $this->tpl->setVariable(
 
 3721            $this->loginSettingsForm->getHTML()
 
 3732        $ilAccess = 
$DIC[
'ilAccess'];
 
 3739        if ($ilAccess->checkAccess(
 
 3744            $ctrl->redirectToURL(
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" . $a_target . 
"&jmpToUser=" . $a_user);
 
 3747            if ($ilAccess->checkAccess(
 
 3754                        $lng->txt(
"msg_no_perm_read_item"),
 
 3763            $lng->txt(
"msg_no_perm_read"),
 
 3775        $ilCtrl = 
$DIC[
'ilCtrl'];
 
 3778            $ilCtrl->setParameterByClass(
 
 3781                (
int) 
$_GET[
"jmpToUser"]
 
 3783            $ilCtrl->redirectByClass(
 
 3800            $a_user_ids = 
$access->filterUserIdsByPositionOfCurrentUser(
 
 3815        if (!count((array) $a_usr_ids)) {
 
 3820        $_POST[
'id'] = $a_usr_ids;
 
 3827            $cmd = $a_cmd . 
"Object";
 
 3828            return $this->$cmd();
 
 3831        $_POST[
'selectedAction'] = $a_cmd;
 
 3847        if ($a_search_form) {
 
 3848            if (
$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
 
 3850                    'activate' => $this->lng->txt(
'activate'),
 
 3851                    'deactivate' => $this->lng->txt(
'deactivate'),
 
 3852                    'accessRestrict' => $this->lng->txt(
'accessRestrict'),
 
 3853                    'accessFree' => $this->lng->txt(
'accessFree')
 
 3857            if (
$rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
 
 3858                $cmds[
"delete"] = $this->lng->txt(
"delete");
 
 3862            if (
$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
 
 3864                    'activateUsers' => $this->lng->txt(
'activate'),
 
 3865                    'deactivateUsers' => $this->lng->txt(
'deactivate'),
 
 3866                    'restrictAccess' => $this->lng->txt(
'accessRestrict'),
 
 3867                    'freeAccess' => $this->lng->txt(
'accessFree')
 
 3871            if (
$rbacsystem->checkAccess(
'delete', $this->object->getRefId())) {
 
 3872                $cmds[
"deleteUsers"] = $this->lng->txt(
"delete");
 
 3876        if (
$rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
 
 3877            $export_types = array(
"userfolder_export_excel_x86", 
"userfolder_export_csv", 
"userfolder_export_xml");
 
 3878            foreach ($export_types as 
$type) {
 
 3883                $cmd = array_pop($cmd);
 
 3884                $cmds[
'usrExport' . ucfirst($cmd)] = $this->lng->txt(
'export') . 
' - ' .
 
 3885                    $this->lng->txt(
$type);
 
 3890        include_once 
"Services/Mail/classes/class.ilMail.php";
 
 3894            $mail->getMailObjectReferenceId()
 
 3896            $cmds[
"mail"] = $this->lng->txt(
"send_mail");
 
 3899        $cmds[
'addToClipboard'] = $this->lng->txt(
'clipboard_add_btn');
 
 3912                $this->lng->txt(
'select_one'),
 
 3915            return $this->ctrl->redirect(
 
 3922            $this->
object->buildExportFile(
 
 3926            $this->ctrl->redirectByClass(
 
 3927                "ilobjuserfoldergui",
 
 3931            $fullname = $this->
object->buildExportFile(
 
 3937                $fullname . 
'.xlsx',
 
 3954                $this->lng->txt(
'select_one'),
 
 3957            return $this->ctrl->redirect(
 
 3964            $this->
object->buildExportFile(
 
 3968            $this->ctrl->redirectByClass(
 
 3969                "ilobjuserfoldergui",
 
 3973            $fullname = $this->
object->buildExportFile(
 
 3996                $this->lng->txt(
'select_one'),
 
 3999            return $this->ctrl->redirect(
 
 4005            $this->
object->buildExportFile(
 
 4009            $this->ctrl->redirectByClass(
 
 4010                "ilobjuserfoldergui",
 
 4014            $fullname = $this->
object->buildExportFile(
 
 4041                $this->lng->txt(
'select_one'),
 
 4044            return $this->ctrl->redirect(
 
 4051        include_once 
"Services/Contact/classes/class.ilMailingLists.php";
 
 4053        $list->deleteTemporaryLists();
 
 4056        include_once 
"Services/Contact/classes/class.ilMailingList.php";
 
 4059        $list->setTitle(
"-TEMPORARY SYSTEM LIST-");
 
 4060        $list->setDescription(
"-USER ACCOUNTS MAIL-");
 
 4061        $list->setCreateDate(date(
"Y-m-d H:i:s"));
 
 4063        $list_id = $list->getId();
 
 4066        foreach ($user_ids as $user_id) {
 
 4067            $list->assignUser($user_id);
 
 4070        include_once 
"Services/Mail/classes/class.ilFormatMail.php";
 
 4072        $mail_data = $umail->getSavedData();
 
 4074        if (!is_array($mail_data)) {
 
 4075            $mail_data = array(
"user_id" => 
$ilUser->getId());
 
 4081        $umail->savePostData(
 
 4082            $mail_data[
'user_id'],
 
 4083            $mail_data[
'attachments'],
 
 4084            '#il_ml_' . $list_id,
 
 4086            $mail_data[
'rcp_cc'],
 
 4087            $mail_data[
'rcp_bcc'],
 
 4088            $mail_data[
'm_type'],
 
 4089            $mail_data[
'm_email'],
 
 4090            $mail_data[
'm_subject'],
 
 4091            $mail_data[
'm_message'],
 
 4092            $mail_data[
'use_placeholders'],
 
 4093            $mail_data[
'tpl_ctx_id'],
 
 4094            $mail_data[
'tpl_ctx_params']
 
 4097        require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
 4104                    'type' => 
'search_res' 
 4114        switch ($a_form_id) {
 
 4117                include_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
 
 4123                    'ps_password_change_on_first_login_enabled' => array($security->isPasswordChangeOnFirstLoginEnabled(
 
 4127                    'ps_password_must_not_contain_loginame' => array((
bool) $security->getPasswordMustNotContainLoginnameStatus(
 
 4131                    'ps_password_chars_and_numbers_enabled' => array($security->isPasswordCharsAndNumbersEnabled(),
 
 4134                    'ps_password_special_chars_enabled' => array($security->isPasswordSpecialCharsEnabled(),
 
 4137                    'ps_password_min_length' => (
int) $security->getPasswordMinLength(),
 
 4138                    'ps_password_max_length' => (
int) $security->getPasswordMaxLength(),
 
 4139                    'ps_password_uppercase_chars_num' => (
int) $security->getPasswordNumberOfUppercaseChars(),
 
 4140                    'ps_password_lowercase_chars_num' => (
int) $security->getPasswordNumberOfLowercaseChars(),
 
 4141                    'ps_password_max_age' => (
int) $security->getPasswordMaxAge()
 
 4143                $fields[
'ps_password_settings'] = array(
null, 
null, $subitems);
 
 4146                    'ps_login_max_attempts' => (
int) $security->getLoginMaxAttempts(),
 
 4147                    'ps_prevent_simultaneous_logins' => array($security->isPreventionOfSimultaneousLoginsEnabled(),
 
 4151                $fields[
'ps_security_protection'] = array(
null, 
null, $subitems);
 
 4153                return array(array(
"generalSettings", $fields));
 
 4158                        'generalSettings', [
 
 4159                            'tos_withdrawal_usr_deletion' => 
$DIC->settings()->get(
 
 4160                                'tos_withdrawal_usr_deletion',
 
 4162                            ) ? 
$DIC->language()->txt(
'enabled') : 
$DIC->language()->txt(
'disabled'),
 
 4175        if (!count($users)) {
 
 4177                $this->lng->txt(
'select_one'),
 
 4180            $this->ctrl->redirect(
 
 4185        include_once 
'./Services/User/classes/class.ilUserClipboard.php';
 
 4190        ilUtil::sendSuccess(
 
 4191            $this->lng->txt(
'clipboard_user_added'),
 
 4194        $this->ctrl->redirect(
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
const IL_UPDATE_ON_CONFLICT
const IL_IGNORE_ON_CONFLICT
GUI class for account codes.
Confirmation screen class.
Class ilCustomUserFieldsGUI.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _getUserFolderId()
static _getAllUserIds($a_filter=0)
static getLogger($a_component_id)
Get component logger.
Class ilMailRfc822AddressParserFactory.
static _reset()
Reset all.
This class represents a non editable value in a property form.
static _getAssignUsersStatus($a_role_id)
Class ilObjUserFolderGUI.
addUserObject()
Add new user;.
addToClipboardObject()
Add users to clipboard.
deactivateUsersObject()
Deactivate users.
importCancelledObject()
import cancelled @access private
resetFilterObject()
Reset filter (note: this function existed before data table filter has been introduced.
saveGeneralSettingsObject()
Save user account settings.
addUserAutoCompleteObject()
Show auto complete results.
confirmdeactivateObject()
Set the selected users inactive @access public.
verifyXmlData($importParser)
cancelNewAccountMailObject()
cancelSearchActionObject()
deleteUsersObject()
Delete users.
restrictAccessObject()
Restrict access.
usrExportCsvObject()
Export csv.
newAccountMailObject()
new account mail administration
showPossibleSubObjects()
show possible subobjects (pulldown menu) overwritten to prevent displaying of role templates in local...
initUserImportForm()
Init user import form.
activateUsersObject()
Activate users.
getPasswordPolicySettingsMap(\ilSecuritySettings $security)
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor @access public.
filterUserIdsByRbacOrPositionOfCurrentUser(array $user_ids)
confirmdeleteObject()
confirm delete Object @access public
initFormGeneralSettings()
init general settings form
getUserMultiCommands($a_search_form=false)
getAdminTabs()
administration tabs show only permissions and trash folder
usrExportXmlObject()
Export xml.
initUserRoleAssignmentForm($xml_file_full_path)
viewObject($reset_filter=false)
list users @access public
setAccessRestrictionObject($a_form=null, $a_from_search=false)
importUserFormObject()
display form for user import
forceUserPasswordResetObject()
askForUserPasswordResetObject()
confirmaccessFreeObject()
"access free"
importUserRoleAssignmentObject()
display form for user import with new FileSystem implementation
jumpToUserObject()
Jump to edit screen for user.
__buildUserFilterSelect()
build select form to distinguish between active and non-active users
importUsersObject()
Import Users with new form implementation.
showLoginnameSettingsObject()
initAccessRestrictionForm($a_from_search=false)
applyFilterObject()
Apply filter.
getActionUserIds()
Get selected items for table action.
cancelDeleteExportFileObject()
cancel deletion of export files
searchResultHandler($a_usr_ids, $a_cmd)
Handles multi command from repository search gui.
downloadExportFileObject()
Download selected export files Sends a selected export file for download.
confirmDeleteExportFileObject()
confirmation screen for export file deletion
saveNewAccountMailObject()
settingsObject()
Global user settings Allows to define global settings for user accounts Note: The Global user setting...
usrExportX86Object()
Export excel.
saveGlobalUserSettingsObject($action="")
cancelUserFolderActionObject()
static _goto($a_user)
goto target group
getImportDir()
get user import directory name with new FileSystem implementation
getTabs()
get tabs @access public
saveLoginnameSettingsObject()
showActionConfirmation($action, $a_from_search=false)
display activation confirmation screen
searchUserAccessFilterCallable(array $a_user_ids)
showActions($with_subobjects=false)
show possible action (form buttons)
setSubTabs($a_tab)
set sub tabs
handleUploadedFiles()
Handles uploaded zip/xmp files with Filesystem implementation.
executeCommand()
execute command
deleteExportFileObject()
delete export files
generalSettingsObject()
Show user account general settings.
checkUserManipulationAccessBool()
Check if current user has access to manipulate user data.
confirmaccessRestrictObject()
confirmactivateObject()
Set the selected users active @access public.
chooseLetterObject()
Choose first letter.
freeAccessObject()
Free access.
addToExternalSettingsForm($a_form_id)
const ORG_OP_EDIT_USER_ACCOUNTS
static _lookupNewAccountMail($a_lang)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getFirstLettersOfLastnames(?array $user_ids=null)
Get first letters of all lastnames.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
prepareOutput($a_show_subobjects=true)
prepare output
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
This class represents an option in a radio group.
Singleton class that stores all security settings.
isPasswordSpecialCharsEnabled()
get boolean if the passwords have to contain special characters
getPasswordMustNotContainLoginnameStatus()
Return whether the password must not contain the loginname or not.
getPasswordMinLength()
get the minimum length for passwords
getPasswordMaxLength()
get the maximum length for passwords
getPasswordNumberOfUppercaseChars()
Returns number of uppercase characters required.
isPasswordCharsAndNumbersEnabled()
get boolean if the passwords have to contain characters and numbers
static _getInstance()
Get instance of ilSecuritySettings.
getPasswordNumberOfLowercaseChars()
Returns number of lowercase characters required.
const DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST
const DEFAULT_ALLOW_CLIENT_MAINTENANCE
const DEFAULT_MAX_COUNT
default value for settings that have not been defined in setup or administration yet
static updateLimitLog($a_new_value)
Log max session setting.
const SESSION_HANDLING_LOAD_DEPENDENT
const SESSION_HANDLING_FIXED
static getSessionExpireValue()
Returns the session expiration value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getInstance()
Singelton get instance.
Auto completion class for user lists.
static getInstance($a_usr_id)
Get singelton instance.
Learning progress account list for user administration.
static getInstance()
Single method to reduce footprint (included files, created instances)
User profile info settings UI class.
static _isSearchable($a_key)
static _saveStatus($a_key, $a_enabled)
User settings configuration (what preferences can be visible/changed/...)
Class ilUserStartingPointGUI.
TableGUI class for user administration.
static getDataDir()
get data directory (outside webspace)
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
redirection script todo: (a better solution should control the processing via a xml file)