Exemplo n.º 1
0
// display login errors
if (isset($session) and $session->issetValue('error_array')) {
    if (!isset($errorbox)) {
        $params = array();
        $params['environment'] = $environment;
        $params['with_modifying_actions'] = $with_modifying_actions;
        $errorbox = $class_factory->getClass(ERRORBOX_VIEW, $params);
        unset($params);
    }
    $errorbox->setText(implode('<br/>', $session->getValue('error_array')));
    $session->unsetValue('error_array');
}
// errorbox or include page
if (!isset($errorbox)) {
    // JCommSy delegation
    if (isset($jcommsy) and array_key_exists($environment->getCurrentModule(), $jcommsy) and $jcommsy[$environment->getCurrentModule()] and (!isset($_GET['mode']) or isset($_GET['mode']) and $_GET['mode'] != 'detailattach') and (!isset($_POST['mode']) or isset($_POST['mode']) and $_POST['mode'] != 'detailattach') and (!isset($_GET['mode']) or isset($_GET['mode']) and $_GET['mode'] != 'print') and (!isset($_POST['mode']) or isset($_POST['mode']) and $_POST['mode'] != 'print') and isset($java_enabled_for) and (in_array($environment->getCurrentContextId(), $java_enabled_for) or in_array($environment->getCurrentPortalId(), $java_enabled_for))) {
        $param = parameterString($_GET, $_POST);
        header("Location: http://" . $jcommsy['Servlet-URL'] . '?mod=' . $current_module . '&fct=' . $environment->getCurrentFunction() . $param);
    } elseif (!file_exists('pages/' . $environment->getCurrentModule() . '_' . $environment->getCurrentFunction() . '.php')) {
        $params = array();
        $params['environment'] = $environment;
        $params['with_modifying_actions'] = $with_modifying_actions;
        $errorbox = $class_factory->getClass(ERRORBOX_VIEW, $params);
        unset($params);
        $errorbox->setText('The page ' . $environment->getCurrentModule() . '_' . $environment->getCurrentFunction() . ' cannot be found!');
        $page->addErrorView($errorbox);
        $current_user = $environment->getCurrentUserItem();
        if (!isset($current_user) or $current_user->getUserID() == '') {
            $page->setWithoutPersonalArea();
        }
    } else {
Exemplo n.º 2
0
         }
     }
     unset($portal);
 }
 /*TYPO3-Anbindung*/
 $typo3_session_id = '';
 if (!empty($_GET['ses_id'])) {
     $typo3_session_id = $_GET['ses_id'];
 } elseif (!empty($_POST['ses_id'])) {
     $typo3_session_id = $_POST['ses_id'];
 } elseif (!empty($_COOKIE['ses_id'])) {
     $typo3_session_id = $_COOKIE['ses_id'];
 }
 if (!empty($typo3_session_id)) {
     $get_param_context_id = $environment->getCurrentContextId();
     $environment->setCurrentContextId($environment->getCurrentPortalId());
     $portal = $environment->getCurrentPortalItem();
     $typo3web_list = $portal->getAuthSourceListTypo3WebEnabled();
     if ($typo3web_list->isNotEmpty()) {
         $typo3web_auth_source = $typo3web_list->getFirst();
         while ($typo3web_auth_source) {
             $authentication = $environment->getAuthenticationObject();
             $typo3web_manager = $authentication->getAuthManagerByAuthSourceItem($typo3web_auth_source);
             $user_data_array = $typo3web_manager->validateSessionID($typo3_session_id);
             if (isset($user_data_array['user_id']) and !empty($user_data_array['user_id'])) {
                 $user_manager = $environment->getUserManager();
                 $auth_source = $typo3web_auth_source->getItemID();
                 $portal_item = $environment->getCurrentPortalItem();
                 if ($authentication->exists($user_data_array['user_id'], $auth_source)) {
                     $user_manager = $environment->getUserManager();
                     $user_manager->setPortalIDLimit($environment->getCurrentPortalID());