On Mar 21, 11:10 pm, cpeele <[email protected]> wrote:
> Am I supposed to set something up in order to use $this->Session in my
> controller?
At the top of your controller, you should only have to ensure your
$components array attribute includes "Session." For example:
var $components = array('Session');
Then use:
$this->Session->write('User.user_id', $userID);
to write the session variable (replace $userID with the correct user
ID), and:
$current_userid = $this->Session->read('User.user_id');
to read the current user ID.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---