Autofill Textfield With The Application Data

i have integrated fb-connect with my yii application. i want user to register via fb-connect and store their information in our database. so, after the fb permission is granted i want new user to be redirected to registration page. and the form should get auto filled with username, email id etc.

i have added this in model:


public function emailid()

	{

	$models=Yii::app()->user->email;

	$abc =array( array('value1'=>$models,'value2'=>'abc'));


	$emailid = CHtml::listData($abc, 'value1', 'value1');

	return $emaild;

	}

and in view:


[indent]<div class="row">

        <?php echo $form->label($model,'email'); ?>

        <?php echo $form->textfield($model,'email',$model->emailid()) ?>

		<?php echo $form->error($model,'master_key'); ?>

    </div>[/indent]

but i cant see the information being filled in the textbox.

however if use “dropDownList” instead of textField then that’s displaying the info.


[indent]<div class="row">

        <?php echo $form->label($model,'email'); ?>

        <?php echo $form->dropDownList($model,'email',$model->emailid()) ?>

		<?php echo $form->error($model,'master_key'); ?>

    </div>[/indent]

help me set the information in text field. thanks