$user = $session->read('Auth.User');

if (empty($user))
{

}

or, simpler:

if ($session->read('Auth.User'))

On Mon, Jun 8, 2009 at 1:55 PM, cakephp_rocks<rockie_rah...@hotmail.com> wrote:
>
> hey this didnt work i want to used it in my view when i put this i get
> this fatel error
>
> Fatal error: Can't use function return value in write context in C:
> \xampp\htdocs\mycake\app\views\post\view.ctp on line 37
>
> On Jun 5, 1:24 pm, Miles J <mileswjohn...@gmail.com> wrote:
>> if (empty($session->read('Auth.User'))) {
>>
>> }
>>
>> On Jun 5, 9:03 am, cakephp_rocks <rockie_rah...@hotmail.com> wrote:
>>
>>
>>
>> > how can you use this if ($loggedIn == 0){
>>
>> > to set message like lets say
>>
>> > i have comment box if users not logged in show them this message
>>
>> > (login to comment )- Hide quoted text -
>>
>> - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to