Hey guys,
I’m wondering how to add the login form in the header of my layout in every page that the user isn’t authenticated.
Thanks in advance
Hey guys,
I’m wondering how to add the login form in the header of my layout in every page that the user isn’t authenticated.
Thanks in advance
You can use widget or portlet or general code(render partial) for this purpose
<div id="header">
<a href="#">Index</a>
<?php
$this->renderPartial('//layouts/userpanel');
?>
</div>
Also use
if(Yii::app()->user->isGuest)
to determine if user is loged in, if you have used the Yii CUserIdentity.
Regards
Liam