Needs:
to work. Please follow the Authsome and Error plugings instructions to install
Implementation:
-
In app/Config/bootstrap add: CakePlugin::load('UserAdmin', array('bootstrap' => false, 'routes' => true));
-
In app/Controller/AppController.php add: App::uses('Me', 'UserAdmin.Lib');
public function beforeFilter() { $this->checkSecurity();
parent::beforeFilter();
}
public function checkSecurity() { if (!(bool)Me::id()) { return $this->redirect(array('controller' => 'users', 'action' => 'logout')); } }
-
Link to user and team controllers like this: Users index
-
Shall you require to display login/registration pages in a different layout template, create layout called outer.ctp which will be used instead of the default one