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
a8c0d79f
Commit
a8c0d79f
authored
Jan 22, 2009
by
webchick
Browse files
#357591
by sun: Add watchdog calls for user cancel operations.
parent
9f54383f
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
a8c0d79f
...
...
@@ -1786,6 +1786,7 @@ function _user_cancel($edit, $account, $method) {
}
db_update
(
'users'
)
->
fields
(
array
(
'status'
=>
0
))
->
condition
(
'uid'
,
$account
->
uid
)
->
execute
();
drupal_set_message
(
t
(
'%name has been disabled.'
,
array
(
'%name'
=>
$account
->
name
)));
watchdog
(
'user'
,
'Blocked user: %name %email.'
,
array
(
'%name'
=>
$account
->
name
,
'%email'
=>
'<'
.
$account
->
mail
.
'>'
),
WATCHDOG_NOTICE
);
break
;
case
'user_cancel_reassign'
:
...
...
@@ -1798,8 +1799,7 @@ function _user_cancel($edit, $account, $method) {
db_delete
(
'users_roles'
)
->
condition
(
'uid'
,
$account
->
uid
)
->
execute
();
db_delete
(
'authmap'
)
->
condition
(
'uid'
,
$account
->
uid
)
->
execute
();
drupal_set_message
(
t
(
'%name has been deleted.'
,
array
(
'%name'
=>
$account
->
name
)));
$variables
=
array
(
'%name'
=>
$account
->
name
,
'%email'
=>
'<'
.
$account
->
mail
.
'>'
);
watchdog
(
'user'
,
'Deleted user: %name %email.'
,
$variables
,
WATCHDOG_NOTICE
);
watchdog
(
'user'
,
'Deleted user: %name %email.'
,
array
(
'%name'
=>
$account
->
name
,
'%email'
=>
'<'
.
$account
->
mail
.
'>'
),
WATCHDOG_NOTICE
);
break
;
}
...
...
modules/user/user.pages.inc
View file @
a8c0d79f
...
...
@@ -400,6 +400,7 @@ function user_cancel_confirm_form_submit($form, &$form_state) {
$account
=
user_save
(
$account
,
$edit
);
_user_mail_notify
(
'cancel_confirm'
,
$account
);
drupal_set_message
(
t
(
'A confirmation request to cancel your account has been sent to your e-mail address.'
));
watchdog
(
'user'
,
'Sent account cancellation request to %name %email.'
,
array
(
'%name'
=>
$account
->
name
,
'%email'
=>
'<'
.
$account
->
mail
.
'>'
),
WATCHDOG_NOTICE
);
if
(
!
isset
(
$_REQUEST
[
'destination'
]))
{
$form_state
[
'redirect'
]
=
"user/
$account->uid
"
;
...
...
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