You are here

function sms_user_delete in SMS Framework 5

Same name and namespace in other branches
  1. 6.2 modules/sms_user/sms_user.module \sms_user_delete()
  2. 6 modules/sms_user/sms_user.module \sms_user_delete()

Deletes a user's mobile information from the database

Parameters

$uid: The uid of the user who's data is to be removed.

$delta: The delta value of the number. Defaults to 'all' which will delete all numbers.

3 calls to sms_user_delete()
sms_user_settings_confirm_form_submit in modules/sms_user/sms_user.module
sms_user_settings_reset_form_submit in modules/sms_user/sms_user.module
sms_user_user in modules/sms_user/sms_user.module

File

modules/sms_user/sms_user.module, line 314
Provides integration between the SMS Framework and Drupal users.

Code

function sms_user_delete($uid, $delta = 'all') {
  $db_args = array(
    $uid,
  );
  if (is_numeric($delta)) {
    $delta_where = 'AND delta = %d';
    $db_args[] = $delta;
  }
  db_query("DELETE FROM {sms_user} WHERE uid = %d {$delta_where}", $db_args);
}