function signup_mark_attended_action in Signup 7
Same name and namespace in other branches
- 6.2 signup.module \signup_mark_attended_action()
- 6 signup.module \signup_mark_attended_action()
Action callback to mark a given signup that the user attended the node.
Parameters
stdClass $signup: Reference to a fully-loaded signup object to record attendance on.
Return value
none Nothing: $signup object is modified by reference and the {signup_log} table is directly UPDATE'ed in the database.
File
- ./
signup.module, line 998 - 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_mark_attended_action(&$signup) {
// TODO Please review the conversion of this statement to the D7 database API syntax.
/* db_query("UPDATE {signup_log} SET attended = %d WHERE sid = %d", TRUE, $signup->sid) */
db_update('signup_log')
->fields(array(
'attended' => TRUE,
))
->condition('sid', $signup->sid)
->execute();
$signup->attended = TRUE;
watchdog('action', 'Marked signup @signup_id attended.', array(
'@signup_id' => $signup->sid,
));
}