Hi Dieter/Others,

I used the suggestion by Dieter about showing whether the user is
logged in or not, and applied the following 2 lines in the startup of
the dAuth Component.
$User = $this->Session->read('User');
$this->controller->set('User',$User);

Now he suggests using
<?php
if($User)    echo ('Logged in as '.$User['username']);
else        echo 'not logged in';
?>
anywhere we wish to print the users, logged in status.

I have dAuth as users/register etc. using the standard tutorial. If I
use the above code on any of the views users/* I am able to print the
same.

But if I use the same code, inside another view, likes notes/index or
notes/add or anything/* etc , then this information doesn't get printed
and I get the error that the variable is undefined.

Thanks in advance,
jkg


--~--~---------~--~----~------------~-------~--~----~
 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