yii2 get username of logged in user By Zeeshan Ahmad June 24, 2018 Use following code get the username of the currently logged in user : <?= \Yii :: $app -> user -> identity -> username ?> Read more