- <?php
- public function beforeFilter() {
- $this->Auth->authenticate = array('Form' => array(
- 'userModel' => 'Usuario',
- 'fields' => array(
- 'username' => 'usuario'
- 'password' => 'senha')));
- $this->Auth->loginAction = array(
- 'controller' => 'usuarios',
- 'action' => 'login',
- 'admin' => true);
- if (!$this->isPrefix('admin'))
- $this->Auth->allow();
- }