0

I've tried all the possible combination for modifying the default model for authentication in cakephp 2.5

actually my current appController is

class AppController extends Controller {
    public $components = array(
        'Session',
        'Auth' => array(
            'loginRedirect' => array(
                'controller' => 'utente',
                'action' => 'login'
            ),
            'logoutRedirect' => array(
                'controller' => 'pages',
                'action' => 'display',
                'home'
            )
        )
    );    

    function beforeFilter() {
        $this->Auth->fields = array(
                'username' => 'email',
                'password' => 'password'
            );
        $this->Auth->userModel = 'Utente';
    }
}

I have also tried with this answers but going into /cakephp-master/ redirect me with no regret to users/login. why?

Community
  • 1
  • 1
asdf
  • 685
  • 7
  • 23
  • Also not working:$this->Auth->authenticate = array( 'Form' => array( 'userModel' => 'Utente' ) ); – asdf Jun 13 '14 at 00:01
  • Exactly the same problem as http://stackoverflow.com/questions/17980196/cant-change-usermodel-using-authcomponent-in-cakephp – asdf Jun 13 '14 at 00:26
  • Solved with loginAction' => array('controller' => 'utente', 'action' => 'login') – asdf Jun 13 '14 at 00:38
  • 1
    please write an answer or delete the question. A comment saying "solved xxx" doesn't make the site treat the question as answered. – AD7six Jun 13 '14 at 07:52

0 Answers0