installAccountProfileTemplates($_SESSION['config']->getName()); $pdfStructurePersistenceManager->installPDFTemplates($_SESSION['config']->getName()); } catch (LAMException $e) { logNewMessage(LOG_ERR, $e->getTitle()); } $conf = $_SESSION['config']; // check if user password is not expired if (!$conf->isHidePasswordPromptForExpiredPasswords()) { $userDn = $_SESSION['ldap']->getUserName(); $userData = ldapGetDN($userDn, ['*', '+', 'pwdReset', 'passwordExpirationTime']); $ldapErrorCode = ldap_errno($_SESSION['ldap']->server()); logNewMessage(LOG_DEBUG, 'Expired password check: Reading ' . $userDn . ' with return code ' . $ldapErrorCode . ' and data: ' . print_r($userData, true)); if (($ldapErrorCode !== 32) && ($ldapErrorCode !== 34)) { $pwdResetMarker = (!empty($userData['pwdreset'][0]) && ($userData['pwdreset'][0] == 'TRUE')); $pwdExpiration = (!empty($userData)) && class_exists('\locking389ds') && \locking389ds::isPasswordExpired($userData); if (($userData === null) || $pwdResetMarker || $pwdExpiration) { metaRefresh("changePassword.php"); exit(); } } } // check if all suffixes in conf-file exist $new_suffs = []; // get list of active types $typeManager = new TypeManager(); $types = $typeManager->getConfiguredTypes(); foreach ($types as $type) { $info = @ldap_read($_SESSION['ldap']->server(), $type->getSuffix(), "(objectClass=*)", ['objectClass'], 0, 0, 0, LDAP_DEREF_NEVER); if (($info === false) && !in_array($type->getSuffix(), $new_suffs)) { $new_suffs[] = $type->getSuffix(); } } // display page to add suffixes, if needed if (($new_suffs !== []) && checkIfWriteAccessIsAllowed()) { $_SESSION['missingSuffixes'] = $new_suffs; metaRefresh("initsuff.php"); exit(); } if (count($types) > 0) { foreach ($types as $type) { if ($type->isHidden()) { continue; } metaRefresh("lists/list.php?type=" . $type->getId()); exit(); } } metaRefresh("tools/treeView.php");