Commit 1de7ae28 authored by alexpott's avatar alexpott

Issue #2594377 by krknth: Undefined variable 'user' in user.api.php change to 'account' ?

parent 04fc9603
......@@ -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.
......
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