You'll want to use some of the session methods:
http://book.cakephp.org/view/567/Methods
For instance:
$userId = $this->Session->read('user.id'); # OR something like that.
Or to check to see if it's set:
if (! $this->Session->check('user_id'))
$this->logon();
Hope that helps.
On Jul 11
On Sat, Jul 11, 2009 at 10:35 PM, damanlovett wrote:
>
> I am SO new to Cakephp, although I love it I am having problems with
> my first app. I have been reading every possible article, book, and
> blog about sessions, but I can't get it right.
>
> I am trying to store the user's id and name in a
I assume you are using Auth component. Which means you can use $this-
>Auth->user('id') and it should give you the users id. And to see
whatever variables are stored for that user you can just debug it debug
($this->Auth->user()) or You could just read the cookie as well if you
really need to.
On
I am SO new to Cakephp, although I love it I am having problems with
my first app. I have been reading every possible article, book, and
blog about sessions, but I can't get it right.
I am trying to store the user's id and name in a session variable
during the login process. Is there a simple way