function user_get_setting

7.x user.module user_get_setting($user_id, $name, $default_value = "")
6.x user.module user_get_setting($user_id, $name, $default_value = "")

Very similar to variable_get

2 calls to user_get_setting()
engagements_get_user_notify_sms_receipt_values in modules/engagements/engagements.module
Get an array of numbers which the user should be notified of when they receive an SMS.
engagements_handle_sms_stop in modules/engagements/engagements.module
This function is called by engagements_handle_incoming_sms, when we receive 'STOP' from the user. We must add them to our "sms_do_not_txt" table, and send a reply letting them know how to re-subscribe in the future.

File

modules/user/user.module, line 1230

Code

function user_get_setting($user_id, $name, $default_value = "") {
  $val = db_result(db_query("SELECT value FROM user_settings WHERE user_id = ? AND name = ?", array($user_id, $name)));

  if (!$val) {
    $val = $default_value;
  }


  return $val;
}