Logout button

In the main page i am having various tabs named Home,About,… Login.

If i click Login, it will get into one page and there its ask for the username and password.

If the user is an admin it will go to one page and other page for others.

After successful login of any user i have to display the logout tab instead of Login tab…

How to do that in yii framework?Please anyone help me…

NOTE: moved to proper section… please pa attention to post in proper section of the forum…

As for your problem… check the default application generated by yiic… it does just what you are asking for…

Ya its having in the default application, but for my application i don’t know to use it.

In Yii application it will generate

array(‘label’=>‘Logout’ , ‘url’=>array(’/login/home’), ‘visible’=>!Yii::app()->user->isGuest)

but for my application,

what is the condition i have to specify in ‘visible’? if the users are admin,user etc.

can u help me to specify the condition in ‘visible’?

I don’t know how you implemented different users… but as you asked:

So you can use the same as the Yii default application… if any users log in isGuest will be false… otherwise true.