You are here

function userpoints_user_delete in User Points 7.2

Same name and namespace in other branches
  1. 7 userpoints.module \userpoints_user_delete()

Implements hook_user_delete().

File

./userpoints.module, line 778

Code

function userpoints_user_delete($account) {

  // The user is being deleted, delete all traces in userpoints and txn tables.
  db_delete('userpoints')
    ->condition('uid', $account->uid)
    ->execute();
  db_delete('userpoints_txn')
    ->condition('uid', $account->uid)
    ->execute();
}