Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
e1dd1e34
Commit
e1dd1e34
authored
Aug 02, 2008
by
Dries
Browse files
- Patch
#218189
by Arancaytar, fago, et al: invoke hook_user before deleting user from database.
parent
4e4e2b49
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
e1dd1e34
...
...
@@ -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
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment