code: public function refreshGroups()
      {
          if ($this->id === null) {
              return [];
          }
  
          global $USER;
  
          $this->fields['GROUP_ID'] = $this->isCurrent()
              ? $USER->getUserGroupArray()
              : static::$bxObject->getUserGroup($this->id);
  
          $this->groupsAreFetched = true;
  
          return $this->fields['GROUP_ID'];
      }
docs: Refresh user groups and save them to a class field.
  
  @return array