user->identity->profile; $photo = "/images/users/".Yii::$app->user->id."_sm.jpg"; if( !file_exists( Yii::getAlias('@webroot').$photo ) ){ $photo = ""; } ?>