function db_get_user_setting
Search API
7.x db.inc | db_get_user_setting($user_id, $var_name = "", $default_value = "") |
6.x db.inc | db_get_user_setting($user_id, $var_name = "", $default_value = "") |
4.x db.inc | db_get_user_setting($user_id, $var_name = "", $default_value = "") |
5.x db.inc | db_get_user_setting($user_id, $var_name = "", $default_value = "") |
Return a specific setting's value, based on the var_name given.
Parameters
unknown_type $user_id:
unknown_type $var_name:
1 call to db_get_user_setting()
- student_search_display_majors_search in modules/
student_search/ student_search.module - Display the majors search sub-tab, where we can select a major and see the students assigned to it.
File
- includes/
db.inc, line 470 - This file contains mostly db shortcuts.
Code
function db_get_user_setting($user_id, $var_name = "", $default_value = "") {
$settings = db_get_user_settings($user_id);
$val = @$settings [$var_name];
if (!$val) {
$val = $default_value;
}
return $val;
}