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
1de7ae28
Commit
1de7ae28
authored
Oct 16, 2015
by
alexpott
Browse files
Issue
#2594377
by krknth: Undefined variable 'user' in user.api.php change to 'account' ?
parent
04fc9603
Changes
1
Show whitespace changes
Inline
Side-by-side
core/modules/user/user.api.php
View file @
1de7ae28
...
...
@@ -42,7 +42,7 @@ function hook_user_cancel($edit, $account, $method) {
// Unpublish nodes (current revisions).
module_load_include
(
'inc'
,
'node'
,
'node.admin'
);
$nodes
=
\
Drupal
::
entityQuery
(
'node'
)
->
condition
(
'uid'
,
$
user
->
id
())
->
condition
(
'uid'
,
$
account
->
id
())
->
execute
();
node_mass_update
(
$nodes
,
array
(
'status'
=>
0
),
NULL
,
TRUE
);
break
;
...
...
@@ -51,7 +51,7 @@ function hook_user_cancel($edit, $account, $method) {
// Anonymize nodes (current revisions).
module_load_include
(
'inc'
,
'node'
,
'node.admin'
);
$nodes
=
\
Drupal
::
entityQuery
(
'node'
)
->
condition
(
'uid'
,
$
user
->
id
())
->
condition
(
'uid'
,
$
account
->
id
())
->
execute
();
node_mass_update
(
$nodes
,
array
(
'uid'
=>
0
),
NULL
,
TRUE
);
// Anonymize old revisions.
...
...
Write
Preview
Supports
Markdown
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