$session_commsy_id = $session->getValue('commsy_id'); if ($environment->inProjectRoom() or $environment->inCommunityRoom() or $environment->inPrivateRoom() or $environment->inGroupRoom()) { $portal_id = $environment->getCurrentPortalID(); } else { $portal_id = $environment->getCurrentContextID(); } if ($session_commsy_id != $portal_id and $session->getValue('user_id') != 'guest' and $session->getValue('user_id') != 'root' and $environment->getCurrentFunction() != 'getfile' and $environment->getCurrentFunction() != 'getingray' and !$outofservice) { redirect($session_commsy_id, 'home', 'index'); } $authentication = $environment->getAuthenticationObject(); $authentication->setModule($current_module); $authentication->setFunction($current_function); // check, if user is allowed here in this context (no password uid evaluation) // and set current user $plugin_boolean_with_check = true; if ($environment->isPlugin($environment->getCurrentModule())) { $plugin_class = $environment->getPluginClass($environment->getCurrentModule()); if (method_exists($plugin_class, 'accessPageWithCheck')) { $plugin_boolean_with_check = $plugin_class->accessPageWithCheck($environment->getCurrentFunction()); } } if (!$authentication->check($session->getValue('user_id'), $session->getValue('auth_source')) and $environment->getCurrentFunction() != 'logout' and $environment->getCurrentFunction() != 'change' and $plugin_boolean_with_check) { ############################################### # show error box in room ############################################### #$params = array(); #$params['environment'] = $environment; #$params['with_modifying_actions'] = true; #$errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params); #unset($params); #$error_array = $authentication->getErrorArray();