public function beforeFilter() { parent::beforeFilter(); if (Configure::read('app.disableValidatePost') === true) { $this->Security->validatePost = false; } }
public function beforeFilter() { parent::beforeFilter(); $this->User = ClassRegistry::init('AppUser'); $this->set('model', 'AppUser'); if (Configure::read('app.disableValidatePost') === true) { $this->Security->validatePost = false; } }
/** * beforeFilter Callback * * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->authorize = array('Controller'); $this->Auth->fields = array('username' => 'email', 'password' => 'password'); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login', 'plugin' => 'users'); $this->Auth->loginRedirect = $this->Session->read('Auth.redirect'); $this->Auth->logoutRedirect = '/'; $this->Auth->authError = __d('users', 'Sorry, but you need to login to access this location.'); $this->Auth->autoRedirect = true; $this->Auth->userModel = 'User'; $this->Auth->userScope = array('OR' => array('AND' => array('User.active' => 1, 'User.email_verified' => 1))); }
/** * beforeFilter Callback * * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->authorize = 'controller'; $this->Auth->fields = array('username' => 'email', 'password' => 'passwd'); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login', 'prefix' => 'admin', 'admin' => false, 'plugin' => 'users'); $this->Auth->loginRedirect = $this->Session->read('Auth.redirect'); $this->Auth->logoutRedirect = '/'; $this->Auth->authError = __d('users', 'Sorry, but you need to login to access this location.', true); $this->Auth->loginError = __d('users', 'Invalid e-mail / password combination. Please try again', true); $this->Auth->autoRedirect = true; $this->Auth->userModel = 'User'; $this->Auth->userScope = array('OR' => array('AND' => array('User.active' => 1, 'User.email_authenticated' => 1))); }
/** * Executes logic before action */ public function beforeFilter() { parent::beforeFilter(); // Disable DebugKit for others than Super Admins if (AuthComponent::user('group_id') != '1') { $this->Components->unload('DebugKit.Toolbar'); } // Change the layout for users plugin to default Dashboard layout if ($this->isAuthorized()) { $this->layout = 'Dashboard.dashboard'; } $this->User = ClassRegistry::init('Dashboard.AppUser'); //Use extended model AppUser $this->set('model', 'AppUser'); }
public function beforeFilter() { parent::beforeFilter(); $this->User = ClassRegistry::init('AppUser'); $this->User->Detail = ClassRegistry::init('AppDetail'); }
public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('register', 'index'); }