Skip to content

Commit

Permalink
feat: Delete account, clear cache
Browse files Browse the repository at this point in the history
  • Loading branch information
attiks committed Sep 2, 2024
1 parent 273ca1d commit c5f85f3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions html/modules/custom/user_merger/user_merger.module
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ function user_merger_merge_ids(int $new_id, array|string $retired_ids = []) {
}
}

// @todo Delete the account(s).
// @todo Clear all cache.
\Drupal::cache()->deleteAll();
// Delete the account(s).
foreach ($retired_ids as $retired_id) {
$user = User::load($retired_id);
$user->delete();
}

// Clear all cache.
drupal_flush_all_caches();
}

/**
Expand Down

0 comments on commit c5f85f3

Please sign in to comment.