function privatemsg_set_setting

7-2 privatemsg.module privatemsg_set_setting($type, $id, $setting, $value)
6-2 privatemsg.module privatemsg_set_setting($type, $id, $setting, $value)
6 calls to privatemsg_set_setting()
pm_email_notify_update_7200 in pm_email_notify/pm_email_notify.install
Convert the old table to privatemsg settings API.
pm_email_notify_user_update in pm_email_notify/pm_email_notify.module
Implements hook_user_update().
PrivatemsgAPITestCase::testGetLink in ./privatemsg.test
Test various use cases for privatemsg_get_link().
PrivatemsgAPITestCase::testSettings in ./privatemsg.test
Tests for the privatemsg_*_setting() functions.
privatemsg_update_7201 in ./privatemsg.install
Migrate settings from {pm_disable} and delete table.

... See full list

File

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

Code

function privatemsg_set_setting($type, $id, $setting, $value) {
  db_merge('pm_setting')->key(array('type' => $type, 'id' => $id, 'setting' => $setting))->fields(array('value' => $value))->execute();

  // Update static cache.
  $cache = &drupal_static('privatemsg_settings', array());
  $cache[$setting][$type][$id] = $value;
}