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,

So,

I think i must use something like this:


<?php

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

			'id'=>'inlineForm',

			'type'=>'inline',

			'action'=>'login',

			'htmlOptions'=>array('class'=>'well'),

		)); ?>

 

<?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.

http://www.yiiframework.com/forum/index.php/topic/18390-yii-user-login-widget/