Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SessionHandler.php

function SessionHandler::destroy

File

core/lib/Drupal/Core/Session/SessionHandler.php, line 109

Class

SessionHandler
Default session handler.

Namespace

Drupal\Core\Session

Code

public function destroy(string $sid) : bool {
    try {
        // Delete session data.
        $this->connection
            ->delete('sessions')
            ->condition('sid', Crypt::hashBase64($sid))
            ->execute();
    } catch (\Exception) {
    }
    return TRUE;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal