Created
January 7, 2012 20:29
-
-
Save patrickmaciel/1575947 to your computer and use it in GitHub Desktop.
Autenticação do usuário - pt-br - CakePHP 2.05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('Controller', 'Controller'); | |
class AppController extends Controller { | |
public $helpers = array(); | |
public $components = array( | |
'Session', | |
'Acl', | |
'Auth' => array( | |
'Actions' => array('actionPath' => 'controllers'), // está correto aqui? | |
'authenticate' => array( | |
'Form' => array( | |
'fields' => array('username' => 'usuario', 'password' => 'senha'), | |
'userModel' => 'Usuario' | |
) | |
), | |
'loginAction' => array('controller' => 'usuarios', 'action' => 'login'), | |
'logoutAction' => array('controller' => 'usuarios', 'action' => 'logout'), | |
'authError' => 'Você não tem permissão para acessar esta página.', | |
'authorize' => array('Controller') | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment