_rsvp_is_owner

Definition

_rsvp_is_owner($rid, $uid = NULL)
rsvp/rsvp.module, line 1595

Description

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

Parameters

$rid The id of the rsvp.

  • @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_is_owner($rid, $uid = NULL) {

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