function user_set_setting

7.x user.module user_set_setting($user_id, $name, $value)
6.x user.module user_set_setting($user_id, $name, $value)

Very similar to variable_set

4 calls to user_set_setting()
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.
engagements_handle_sms_unstop in modules/engagements/engagements.module
User opted-IN to receiving txt messages.
user_edit_user_form_submit in modules/user/user.module
Submit handler for our edit faculty form
user_user_settings_form_submit in modules/user/user.module
Save values from our settings form into the user_settings table (or other tables), as appropriate.

File

modules/user/user.module, line 1221

Code

function user_set_setting($user_id, $name, $value) {
  db_query("REPLACE INTO user_settings (user_id, name, value, updated) VALUES (?, ?, ?, ?)", array($user_id, $name, $value, time()));
}