From 3a84ffb59fd3d48dd10bfad860e170f43573d77e Mon Sep 17 00:00:00 2001 From: noud Date: Wed, 14 Nov 2012 10:52:53 +0100 Subject: [PATCH] terms user must accept terms. --- app/Controller/AppController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index eb9c5d235..ab01c2a0c 100755 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -61,6 +61,12 @@ class AppController extends Controller { } public function beforeFilter() { + + // user must accept terms + if (!$this->Auth->user('termsaccepted') && ($this->request->here != '/users/terms') && ($this->request->here != '/users/logout') && ($this->request->here != '/users/login')) { + $this->redirect(array('controller' => 'users', 'action' => 'terms')); + } + // REST things if ($this->_isRest()) { // disable CSRF for REST access