Re: Change view by userstate

2009-02-19 Thread amarradi
Thanks a lot, thats the better way. 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

Re: Change view by userstate

2009-02-19 Thread Johnny
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 wrote: > I found the solution > > I set an username on an variable, and after

Re: Change view by userstate

2009-02-19 Thread amarradi
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')); }

Change view by userstate

2009-02-19 Thread amarradi
Hello, i want that my login link will be an logout link when a user with this browser is login in. When he is logout the link should show login. And if he is login the link should show logout I tried debug ($session->read()); die; but there is no state variable. Which variable can i use for t