It works if you use $this, not $read:
<h4>Welcome <?php echo $this->controller->Session->read('User') ?></h4>
HTH,
Eric
On 2/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hey there bakers!
>
> I just added session security into my application, which is working
> nicely, however I'd like to have a message at the top of every
> authenticated page that indicates that we know who is logged in.
>
> My authentication is loading data using the following (straight from
> the cakePHP manual example...):
> $this->Session->write('User', $someone['User']);
>
> Now I want to pull it out and put it on the page via a view, but I'm
> not having any luck with this code:
> <h4>Welcome <?php echo $read->controller->Session->read('User') ?></
> h4>
>
> What this puts on the screen is "Welcome Array"
>
> Does anyone know what I'm doing wrong here?
>
> Thanks,
>
> --Patrick
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---