You are here

function signup_get_signups in Signup 7

Same name and namespace in other branches
  1. 6.2 signup.module \signup_get_signups()
  2. 6 signup.module \signup_get_signups()

Retrieve a list of all users who have signed up for a node.

Parameters

int $nid: The node ID to retrieve signups for.

Return value

array An array of $signup objects containing all columns from {signup_log} along with the 'name', 'mail', and 'language' columns from {users}.

2 calls to signup_get_signups()
signup_broadcast_form in includes/broadcast.inc
Form builder for the signup broadcast form.
signup_send_broadcast in includes/broadcast.inc
Send an email message to users who have signed up to a node.

File

./signup.module, line 1124
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function signup_get_signups($nid) {
  $signups = array();
  $result = db_query("SELECT u.uid, u.name, u.mail, u.language, s_l.* FROM {signup_log} s_l INNER JOIN {users} u ON u.uid = s_l.uid WHERE s_l.nid = :nid", array(
    ':nid' => $nid,
  ));
  foreach ($result as $signup) {
    $signups[] = $signup;
  }
  return $signups;
}