but why $this->redirect('/', null, false); ?
it should be just $this->redirect('/'); to properly exit on redirect
Am Freitag, 12. Juli 2013 14:14:02 UTC+2 schrieb Allan Diego:
Hello,I have a redirection problem after upgrade to 2.3.7
accessing:
http://www.mysite.com/test/users/login
but accessing:
http://www.mysite.com/test/AnyController I am directed to http://www.mysite.com/test/users/login (thats ok too)=> logging in, I am directed to http://www.mysite.com/test/test /AnyController (duplicated base folder on redirect)
debug kit Session:
- Auth
- redirect /test/AnyController
object(CakeRequest) { url => 'test/AnyController' base => '/test' webroot => '/test/' here => '/test/test/AnyController' }
AppController beforeFilter()
$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'index');
public function login() {
if ($this->Session->read('Auth.Usuario' )) {
$this->redirect('/', null, false);
}
if ($this->request->is('post')) {
if ($this->Auth->login()) {
$this->redirect($this->Auth->redirectUrl ());
//$this->redirect($this->Auth->redirect());
} else {
$this->Session->setFlash('Incorrect Users or password.' , 'flash_erro');
}
}
}
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment