Skip to content

Instantly share code, notes, and snippets.

View DuaelFr's full-sized avatar

Edouard Cunibil DuaelFr

View GitHub Profile
<?php
/**
* Get all users of a group who contributed.
*/
function _events_resource_get_users_in_group($gid) {
$query = db_select('og_membership', 'ogm');
$query->join('node', 'n', "n.nid = ogm.etid AND ogm.entity_type = 'node'");
$query->join('user', 'u', 'n.uid = u.uid');
$query->fields('n', array('uid'))