public function __construct() { parent::__construct(); $authed = $this->app['session']->get('admin_authed', false); if ($authed) { $this->authed = $authed; } else { if (isset($_SERVER['REDIRECT_URL'])) { $this->app['session']->set('url_redirect', $_SERVER['REQUEST_URI']); } else { $this->app['session']->set('url_redirect', $this->app->url($this->request->get('_route'), $this->request->get('_route_params'))); } $response = $this->redirect('admin_auth_signin'); $response->send(); exit; } }
public function beforeFilter(Event $event) { parent::beforeFilter($event); $this->Auth->deny(['index']); }
public function beforeFilter(Event $event) { parent::beforeFilter($event); $this->Auth->deny('index'); $this->Auth->allowedActions = array('forgot', 'send', 'login', 'register', 'sso_login'); }