$_SESSION is a php construct. Cake can't do anything to stop you from
using it. Not that you should use it. You should use the Session
component whenever possible. But if it's not, I think you can get away
with things like echo $_SESSION['User']['username'] if you've stored
$this->Session->write('User.username', 'jimmy');

I haven't seen a better practice for these things yet.


On Feb 21, 5:50 pm, Raistlin Majere <[EMAIL PROTECTED]> wrote:
> I was not logged in, then I visited a page with "if
> (empty($_SESSION))", but "echo $_SESSION" displayed "Array" in that
> page!
>
> If I am not logged in, why is there a $_SESSION in views? The manual
> is telling me how to check session in controller, before all actions
> in controller and before a single controller action, but I need to
> check session in views! How can I do that?
>
> (AppServ 2.5.9
> Apache 2.2.4
> PHP 5.2.3
> MySQL 5.0.45
> phpMyAdmin-2.10.2
> CakePHP 1.1.19.6305)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to