php - Can't change 'userModel' using AuthComponent in CakePHP -


i'va been trying change 'usermodel' default 'user' 'usuario'. i'va done before in cakephp 1.3 can't work using lastest version.

here's code (appcontroller.php):

app::uses('controller', 'controller');  class appcontroller extends controller {     public $components = array(         'auth' => array(             'loginerror' => "nombre de usuario o contraseƱa incorrectos.",             'autherror' => "debes ingresar con tu cuenta de usuario.",             'loginredirect' => array('controller' => 'administrador', 'action' => 'productos'),             'logoutredirect' => array('controller' => 'usuarios', 'action' => 'login')         ),         'session',         'email'     );      public function beforefilter() {         $this->auth->authenticate = array(             'basic' => array('usermodel' => 'usuario'),             'form' => array('usermodel' => 'usuario')         );     } } 

thanks in advance.

edit: component redirects me "/users/login" instead of "/usuarios/login" , login form in "/usuarios/login" doesn't work. it's never changed usermodel.

set custom usermodel nothing auth::loginaction point /users/login default. can override in controller::beforefilter() callback or controller::$components array. hope help.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -