if you are using the Auth component for user authentification, you can
check if a user is logged in or not simply by using:
$session->check('Auth.User.id')
as a condition in your if clause

On Feb 19, 5:19 pm, amarradi <radis...@googlemail.com> wrote:
> I found the solution
>
> I set an username on an variable, and after Logout this variable i set
> to null
>
> :)
>
> if(!empty($username)) {
>   echo $html->link('Logout', array
> ('controller'=>'users','action'=>'logout'));} else {
>
>   echo $html->link('Login', array
> ('controller'=>'users','action'=>'login'));}
>
> ?>
>
> many greetings
>
> Marcus Radisch

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