php - unable to login using cakephp -
i using auth component , login functionality in application. whenever try login, gives me invalid username , password error.
and throws warning like:
warning (2): invalid argument supplied foreach() [core\cake\utility\hash.php, line 51]
this login function:-
public function login() { if ($this->request->is('post')) { if ($this->auth->login()) { $this->redirect($this->auth->redirect()); } else { $this->session->setflash(__('invalid username or password, try again')); } } } any on this? don't understand problem is. in advance.
updated: here code appcontroller.
public $components = array( 'session', 'auth' => array( 'loginredirect' => array('controller' => 'woods', 'action' => 'index'), 'logoutredirect' => array('controller' => 'users', 'action' => 'add') ) );
Comments
Post a Comment