rsvp_attendees_users($rid)
rsvp/rsvp.module, line 1403
Returns a list of users in a specific role.
$rid int The role ID.
string list of users.
<?php
function rsvp_attendees_users($rid) {
if (is_numeric($rid)) {
$subs = "";
// if the requested role is authenticated, no records will be returned from
// normal query
if ($rid == 2) {
$query = db_query('SELECT name FROM {users} ORDER BY uid DESC');
}
else {
$query = db_query('SELECT name FROM {users} u INNER JOIN {users_roles} ur ON u.uid = ur.uid WHERE ur.rid = %d ORDER BY u.uid DESC', $rid);
}
while ($u = db_fetch_object($query)) {
$subs .= $u->name ."\r\n";
}
print $subs;
exit();
}
}
?>