function privatemsg_list_page in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 privatemsg.pages.inc \privatemsg_list_page()
- 7 privatemsg.pages.inc \privatemsg_list_page()
List messages.
Parameters
$argument: An argument to pass through to the query builder.
$account_check: Account to check if current user has access.
2 string references to 'privatemsg_list_page'
- privatemsg_filter_menu in privatemsg_filter/
privatemsg_filter.module - Implements hook_menu().
- privatemsg_menu in ./
privatemsg.module - Implements hook_menu().
File
- ./
privatemsg.pages.inc, line 16 - User menu callbacks for Privatemsg.
Code
function privatemsg_list_page($argument = 'list', $account_check = NULL) {
global $user;
// Setting default behavior...
$account = $user;
// Because uid is submitted by the menu system, it's a string not a integer.
if (is_object($account_check) && $account_check->uid != $user->uid) {
if (!privatemsg_user_access('read all private messages')) {
return MENU_ACCESS_DENIED;
}
// Has rights and user_load return an array so user does exist.
$account = $account_check;
}
return drupal_get_form('privatemsg_list', $argument, $account);
}