- Patch #218189 by Arancaytar, fago, et al: invoke hook_user before deleting user from database.

merge-requests/26/head
Dries Buytaert 2008-08-02 20:08:24 +00:00
parent 4e4e2b4992
commit e1dd1e3482
1 changed files with 1 additions and 1 deletions

View File

@ -1552,12 +1552,12 @@ function user_delete($edit, $uid) {
$account = user_load(array('uid' => $uid));
sess_destroy_uid($uid);
_user_mail_notify('status_deleted', $account);
module_invoke_all('user', 'delete', $edit, $account);
db_query('DELETE FROM {users} WHERE uid = %d', $uid);
db_query('DELETE FROM {users_roles} WHERE uid = %d', $uid);
db_query('DELETE FROM {authmap} WHERE uid = %d', $uid);
$variables = array('%name' => $account->name, '%email' => '<' . $account->mail . '>');
watchdog('user', 'Deleted user: %name %email.', $variables, WATCHDOG_NOTICE);
module_invoke_all('user', 'delete', $edit, $account);
}
/**