public function get_shared_group_members($cm, $userid) {
        if (!isset($this->sharedgroupmembers[$userid])) {
            $this->sharedgroupmembers[$userid] = array();
            if ($members = groups_get_activity_shared_group_members($cm, $userid)) {
                $this->sharedgroupmembers[$userid] = array_keys($members);
            }
        }

        return $this->sharedgroupmembers[$userid];
    }