*/ protected $allowedFields = [ 'username', 'status', 'status_message', 'active', 'is_owner', 'last_active', 'deleted_at', ]; /** * @return User[] */ public function getPodcastContributors(int $podcastId): array { return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->findAll(); } public function getPodcastContributor(int $contributorId, int $podcastId): ?User { return $this->select('users.*') ->join('auth_groups_users', 'users.id = auth_groups_users.user_id') ->where('users.id', $contributorId) ->like('auth_groups_users.group', "podcast#{$podcastId}-") ->first(); } }