summaryrefslogtreecommitdiff
path: root/manager/library/plugins/plugin.forceauth.php
diff options
context:
space:
mode:
Diffstat (limited to 'manager/library/plugins/plugin.forceauth.php')
-rw-r--r--manager/library/plugins/plugin.forceauth.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/manager/library/plugins/plugin.forceauth.php b/manager/library/plugins/plugin.forceauth.php
index 004e500..e971056 100644
--- a/manager/library/plugins/plugin.forceauth.php
+++ b/manager/library/plugins/plugin.forceauth.php
@@ -4,26 +4,26 @@
* $Id: plugin.forceauth.php 40 2009-12-21 09:40:43Z markus $
*/
class ForceAuth extends Zend_Controller_Plugin_Abstract {
- public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) {
- $session = Zend_Registry::get('session');
+ public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) {
+ $session = Zend_Registry::get('session');
- if (in_array($request->getControllerName(), array('login', 'error', 'js', 'img', 'css')))
- return;
+ if (in_array($request->getControllerName(), array('login', 'error', 'js', 'img', 'css')))
+ return;
- if (!isset($session->authdata) || !isset($session->authdata['authed']) || $session->authdata['authed'] === false) {
- $fc = Zend_Controller_Front::getInstance();
+ if (!isset($session->authdata) || !isset($session->authdata['authed']) || $session->authdata['authed'] === false) {
+ $fc = Zend_Controller_Front::getInstance();
- $response = $fc->getResponse();
- $response->canSendHeaders(true);
+ $response = $fc->getResponse();
+ $response->canSendHeaders(true);
- $response->setHeader('Location', 'login', true);
- $response->setHeader('Status', '301', true);
- Log::Log()->debug('redirected to login');
+ $response->setHeader('Location', 'login', true);
+ $response->setHeader('Status', '301', true);
+ Log::Log()->debug('redirected to login');
- $request->setModuleName('default')
- ->setControllerName('login')
- ->setActionName('index')
- ->setDispatched(false);
- }
- }
+ $request->setModuleName('default')
+ ->setControllerName('login')
+ ->setActionName('index')
+ ->setDispatched(false);
+ }
+ }
}