From 7323a652bd95f280ca2cfa4fdf514b3e577fcd6f Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Thu, 28 May 2009 00:22:07 +0000 Subject: [PATCH] FEATURE SingleSignOn - First commit, basic functionality. Until we get into a live environment, you can fake $_SERVER['REMOTE_USER'] in the site-wide _config.php. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78035 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/Controller.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/control/Controller.php b/core/control/Controller.php index 8572ddf23..a40f9d4b8 100644 --- a/core/control/Controller.php +++ b/core/control/Controller.php @@ -108,12 +108,16 @@ class Controller extends RequestHandler { $this->urlParams = $request->allParams(); $this->request = $request; $this->response = new HTTPResponse(); + + $this->extend('onBeforeInit'); // Init $this->baseInitCalled = false; $this->init(); if(!$this->baseInitCalled) user_error("init() method on class '$this->class' doesn't call Controller::init(). Make sure that you have parent::init() included.", E_USER_WARNING); + $this->extend('onAfterInit'); + // If we had a redirection or something, halt processing. if($this->response->isFinished()) { $this->popCurrent(); @@ -320,7 +324,7 @@ class Controller extends RequestHandler { $obj = ($this->customisedObj) ? $this->customisedObj : $this; if($params) $obj = $this->customise($params); - + return $template->process($obj); }