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];
    }
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];
    }
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 ] ; }
Returns IDs of the users who share group membership with the specified user.

@param stdClass|cm_info $cm Course-module
@param int $userid User ID
@return array An array of ID of users.
Returns IDs of the users who share group membership with the specified user .