show logout button along with the name of user after successfull login

后端 未结 2 1878
忘了有多久
忘了有多久 2021-01-29 09:10

I am a yiibie, and i am stuck at a point. I have three roles in my project. 1.Admin. 2.Owner 3. Authenticated User. I have a header and a footer widget.In header widget which is

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-29 09:20

    Is easy after login you can see the username otherwise you see nothings

    user->isGuest) {
        echo Yii::app()->user->name;
       }
     ?>
    

提交回复
热议问题