In my cakephp(v 2.3.4) app, I am using the code below to manually login
users after they register, as provided in the
manual<http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#manually-logging-users-in>
.
if ($this->User->save($this->request->data)) {
$id = $this->User->id;
$this->request->data['User'] =
array_merge($this->request->data['User'], array('id' => $id));
if($this->Auth->login($this->request->data['User'])) {
$this->redirect('/homepage');
}
}
I am getting the $this->Auth->login($this->request->data['User']) response
as true and it is getting redirected to the home page. But the user is not
logged in homepage (or in any other page). Please help me in fixing this.
Thanks in advance.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.