i might be really wrong but if you can see it in the view function
then it must be in session. To me, the login function is just for
logging in and then it redirects to where the userid can be
retrieved. . . .somebody else could explain this a little better then
me.

On Sep 22, 8:32 am, gabriel <[EMAIL PROTECTED]> wrote:
> Hi, I have a reasonable simple question for an experienced person..
>
> I did authentication according to the cookbook, I want to access the
> user id via session.
>
> I do this in the user controller...
> function login() {
>   $userid = $this->Auth->user('id');
>   $this->Session->write('id', $userid );
>    }
>
> Then I want to do this in the view..
> <? pr($session->read('id')); ?>
>
> to see if I get the value, but it does not seems to work in the login
> function, if you place it in the view function it works, but I need
> the values to be set to the session at login.
>
> Help will be greatly appreciated. thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to