function _privatemsg_limits_get_received in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 privatemsg_limits/privatemsg_limits.module \_privatemsg_limits_get_received()
- 7 privatemsg_limits/privatemsg_limits.module \_privatemsg_limits_get_received()
Returns the number of messages/threads a user has received.
Parameters
user $account User object:
int $timeframe How many seconds back should be considered:
Return value
int Number of messages/threads
3 calls to _privatemsg_limits_get_received()
- privatemsg_limits_form_privatemsg_list_alter in privatemsg_limits/
privatemsg_limits.module - Implements hook_form_FORM_ID_alter().
- privatemsg_limits_privatemsg_block_message in privatemsg_limits/
privatemsg_limits.module - Implements hook_privatemsg_block_message().
- privatemsg_limits_privatemsg_message_validate in privatemsg_limits/
privatemsg_limits.module - Implements hook_privatemsg_message_validate().
File
- privatemsg_limits/
privatemsg_limits.module, line 315 - Privatemsg Quota module
Code
function _privatemsg_limits_get_received($account) {
$query = _privatemsg_assemble_query(array(
'received',
'privatemsg_limits',
), $account);
return (int) db_result(db_query($query['count']));
}