Question

This is my UserController, index Action, zii generated file , from my model User:

/**
 * Lists all models.
 */
public function actionIndex()
{
    $dataProvider=new CActiveDataProvider('User');
    $this->render('index',array(
        'dataProvider'=>$dataProvider,
    ));
}

And this is my view file of the above action:

 <?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
 )); ?>

These are all defaults. What i need is to be able to hide my users password and email, because now with the default crud operation are visible. When i go to my user controller action index i want a list with all my users but only with their user id and the username, without precious information like email and password.

Was it helpful?

Solution

Open file webapp_folder/protected/views/user/_view.php and delete lines with password and email.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top