I am using User_Management_Module_0.4 in my yii app.
I have a model business to store users business in table.
table having fields username( I need same user name which is stored in users table which is of user management module)
in my _form.php I try to get the username of loged in user but its not working.
whats wrong in my code?? please tell me _form.php
<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id'=>'shops-form',
'type'=>'horizontal',
'enableClientValidation'=>false,
'enableAjaxValidation'=>false,
'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<div class="row">
<?php echo $form->textFieldRow($model,'name',$model->getUserOptions()); ?>
</div>
business.php (model)
public function getUserOptions()
{$username = Yii::t("UserModule.user", "username");
//$uname =Yii::app()->user->username;
return $username;
}