Redirect after success login
Hello,
i have got a problem with redirecting after success login.
In app_controller have:
function beforeFilter() {
$this->Auth->fields = array(
'email' => 'username',
'password' => 'password'
);
$this->Auth->allow('*');
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'account');
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'logout');
//$this->Auth->loginError = 'No username and password was found with that combination.';
}
And after login Im awaited to show account view in users/account
But I am redirected to the web root.
Doesn't anybody know, how to solve it?
Thanks for any reply..
Asked by blacksymmetry, on 12/2/10
1 Answer
cake remembers the page you were on before the login, so its possible its using that.
ive got around this with deleteing the url that is saved in the session, or $this->Auth->autoRedirect = false;
http://book.cakephp.org/view/395/autoRedirect
Answered by dogmatic69on 12/2/10
<< comments | comments >>
<< previous next >>
Tagged with
Rating
0
Viewed
518 times
Last Activity
on 12/2/10