You are here

function _privatemsg_limits_get_sent in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.2 privatemsg_limits/privatemsg_limits.module \_privatemsg_limits_get_sent()
  2. 7 privatemsg_limits/privatemsg_limits.module \_privatemsg_limits_get_sent()

Returns the number of messages/threads a user has written.

Parameters

user $account User object:

int $timeframe How many seconds back should be considered:

Return value

int Number of messages/threads

1 call to _privatemsg_limits_get_sent()
privatemsg_limits_privatemsg_message_validate in privatemsg_limits/privatemsg_limits.module
Implements hook_privatemsg_message_validate().

File

privatemsg_limits/privatemsg_limits.module, line 273
Privatemsg Quota module

Code

function _privatemsg_limits_get_sent($account, $timeframe) {
  $query = _privatemsg_assemble_query(array(
    'sent',
    'privatemsg_limits',
  ), $account, $timeframe);
  return db_result(db_query($query['count']));
}