src/modules/user/models/User.php
public function getRolesNames ()
		{
			$auth = Yii::$app->getAuthManager();
			$rolesByUser = $auth->getRolesByUser($this->id);
			$roles = ArrayHelper::objectsAttribute($rolesByUser, 'name');

			return $roles;
		}
public function getRolesNames ()
		{
			$auth = Yii::$app->getAuthManager();
			$rolesByUser = $auth->getRolesByUser($this->id);
			$roles = ArrayHelper::objectsAttribute($rolesByUser, 'name');

			return $roles;
		}
public function getRolesNames ( ) { $ auth = Yii :: $ app -> getAuthManager ( ) ; $ rolesByUser = $ auth -> getRolesByUser ( $ this -> id ) ; $ roles = ArrayHelper :: objectsAttribute ( $ rolesByUser , 'name' ) ; return $ roles ; }
Gets user all roles.

@return array
Gets user all roles .