You are here

function _support_ticket_exists in Support Ticketing System 6

Same name and namespace in other branches
  1. 7 support.module \_support_ticket_exists()

Helper function to determine if a user has support tickets already.

1 call to _support_ticket_exists()
support_page_user_access in ./support.module
Access callback for user support ticket pages.

File

./support.module, line 2667
support.module

Code

function _support_ticket_exists($account) {
  return (bool) db_result(db_query_range(db_rewrite_sql("SELECT 1 FROM {node} n WHERE n.type = 'support_ticket' AND n.uid = %d AND n.status = 1"), $account->uid, 0, 1));
}