_rsvp_has_rsvps

Definition

_rsvp_has_rsvps($nid, $uid = NULL)
rsvp/rsvp.module, line 1615

Description

  • Checks to see if a user is the owner of an rsvp for an event node.
*
  • *

Parameters

$nid The id of the event node.

  • @param $uid The uid of the user. If null, it uses global $user->uid.
  • @return boolean. True if user is the owner of an rsvp to the event.

Code

<?php
function _rsvp_has_rsvps($nid, $uid = NULL) {
  if (!$uid) {
    global $user;
    $uid = $user->uid;
  }
  if (db_num_rows(db_query('SELECT uid FROM {rsvp} WHERE nid = %d AND uid = %d', $nid, $uid)) > 0) {
    return TRUE;
  }
  return FALSE;
}
?>