<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Users';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create User', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?=
        GridView::widget([
            'dataProvider' => $dataProvider,
            'columns' => [
                'user_id',
                'user_name',
                'user_email:email',
                'user_birthday',
                ['class' => 'yii\grid\ActionColumn'],
                array(
                    'format'  =>  'image',
                    'attribute' => 'user_name',
                    'value'=>function($data){
                        return $data->user_name;
                    }
                )
            ]
        ]);
    ?>

</div>

<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Users';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create User', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?=
        GridView::widget([
            'dataProvider' => $dataProvider,
            'columns' => [
                'user_id',
                'user_name',
                'user_email:email',
                'user_birthday',
                ['class' => 'yii\grid\ActionColumn'],
                array(
                    'format'  =>  'html',
                    'attribute' => 'user_name',
                    'value'=>function($data){
                        return $data->user_name;
                    }
                )
            ]
        ]);
    ?>

</div>

Update format type in View Index User
Update format type in View Index User
