if (!$session->issetValue('cookie')) { // second time a user get a commsy page if (isset($_COOKIE['SID'])) { // are cookies allowed? $session->setValue('cookie', '1'); // yes } else { $session->setValue('cookie', '0'); // no } } // commsy id in session and on current page is different // -> user manipulated the url // -> redirect to home index of the portal, if user != guest and user != root $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());