SessionHandler::destroy

public SessionHandler::destroy($sid)

Destroys a session.

Parameters

string $sessionId Session ID, see http://php.net/function.session-id:

Return value

bool true on success, false on failure

Overrides SessionHandlerInterface::destroy

See also

http://php.net/sessionhandlerinterface.destroy

File

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

Class

SessionHandler
Default session handler.

Namespace

Drupal\Core\Session

Code

1
2
3
4
5
6
7
8
public function destroy($sid) {
  // Delete session data.
  $this->connection->delete('sessions')
    ->condition('sid', Crypt::hashBase64($sid))
    ->execute();
 
  return TRUE;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.