You are here

function signup_cancel_signup in Signup 5

Same name and namespace in other branches
  1. 5.2 signup.module \signup_cancel_signup()
  2. 6.2 signup.module \signup_cancel_signup()
  3. 6 signup.module \signup_cancel_signup()
  4. 7 signup.module \signup_cancel_signup()

Callback function for canceling signups

2 calls to signup_cancel_signup()
signup_form_cancel_submit in ./signup.module
Submits the cancel signup form
signup_user in ./signup.module
Implementation of hook_user().

File

./signup.module, line 827

Code

function signup_cancel_signup($uid, $nid, $anon_mail = NULL) {

  // Delete the selected user from the log table.
  if ($anon_mail) {
    db_query("DELETE FROM {signup_log} WHERE anon_mail = '%s' AND nid = %d", $anon_mail, $nid);
  }
  else {
    db_query('DELETE FROM {signup_log} WHERE uid = %d AND nid = %d', $uid, $nid);
  }
  $node = node_load($nid);
  module_invoke_all('signup_cancel', $node, $uid);
  drupal_set_message(t('Signup to !title cancelled.', array(
    '!title' => l($node->title, "node/{$node->nid}"),
  )));
}