Commit e1dd1e34 authored by Dries's avatar Dries

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

parent 4e4e2b49
......@@ -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);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment