function privatemsg_get_default_setting_ids

7-2 privatemsg.module privatemsg_get_default_setting_ids($account = NULL)
6-2 privatemsg.module privatemsg_get_default_setting_ids($account = NULL)

Extract the default ids of a user account.

Defaults to the user id, role ids and the global default.


$account: User object, defaults to the current user.

Return value

Array of ids to be used in privatemsg_get_setting().

3 calls to privatemsg_get_default_setting_ids()
PrivatemsgAPITestCase::testSettings in ./privatemsg.test
Tests for the privatemsg_*_setting() functions.
privatemsg_get_setting in ./privatemsg.module
Retrieve a user setting.
privatemsg_is_disabled in ./privatemsg.module
Checks the status of private messaging for provided user.


./privatemsg.module, line 3500
Allows users to send private messages to other users.


function privatemsg_get_default_setting_ids($account = NULL) {
  if (!$account) {
    global $user;
    $account = $user;
  return array(
    'user' => array($account->uid),
    'role' => array_keys($account->roles),
    'global' => array(0),