You are here

function uc_file_remove_user in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_file/uc_file.module \uc_file_remove_user()
  2. 7.3 uc_file/uc_file.module \uc_file_remove_user()

Removes all of a user's downloadable files.

Parameters

$uid: A Drupal user ID.

1 call to uc_file_remove_user()
uc_file_user_delete in uc_file/uc_file.module
Implements hook_user_delete().

File

uc_file/uc_file.module, line 1572

Code

function uc_file_remove_user($user) {
  db_query("DELETE FROM {uc_file_users} WHERE uid = %d", $user->uid);

  // Echo the deletion only if something was actually deleted.
  if (db_affected_rows()) {
    drupal_set_message(t('%user has had all of his/her downloadable files removed.', array(
      '%user' => $user->name,
    )));
  }
}