function AccountCancellation::regenerateSession

Same name and namespace in other branches
  1. 11.x core/modules/user/src/AccountCancellation.php \Drupal\user\AccountCancellation::regenerateSession()

Implements callback_batch_finished().

Finished batch processing callback for cancelling a user account.

@internal

See also

AccountCancellation::cancel()

File

core/modules/user/src/AccountCancellation.php, line 169

Class

AccountCancellation
User account cancellation service.

Namespace

Drupal\user

Code

public function regenerateSession() : void {
  // Regenerate the users session instead of calling session_destroy() as we
  // want to preserve any messages that might have been set.
  $this->session
    ->migrate();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.