Inline Login Form

I my template i have to box on top of page for login,

after login this boxs must hide, and i have profile and logout link

I have also use yii-user for user management,


I think i must use something like this:


$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(





		)); ?>


<?php echo $form->textFieldRow($model, 'textField', array('class'=>'input-small')); ?>

<?php echo $form->passwordFieldRow($model, 'password', array('class'=>'input-small')); ?>

<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Log in')); ?>

<?php $this->endWidget();

but in main page of site (sitecontroller), We dont have any $model!

what can i do?

Hi reza bagheri,

I think this topic might help you.