code: public function getUserIdsByRole($roleName)
      {
          $result = [];
          foreach ($this->assignments as $userID => $assignments) {
              foreach ($assignments as $userAssignment) {
                  if ($userAssignment->roleName === $roleName && $userAssignment->userId == $userID) {
                      $result[] = (string) $userID;
                  }
              }
          }
  
          return $result;
      }
docs: {@inheritdoc}
  @since 2.0.7