SessionHandlerDB::getSessions()

Get the most recent sessions

Returns an array of array for each session, which includes all the session info except or the 'data' property. Use the getSessionData() method to retrieve that.

Usage

// basic usage
$array = $sessionHandlerDB->getSessions();

// usage with all arguments
$array = $sessionHandlerDB->getSessions(int $seconds = 300, int $limit = 100);

Arguments

NameType(s)Description
$seconds (optional)int

Sessions up to this many seconds old

$limit (optional)int

Max number of sessions to return

Return value

array

Sessions newest to oldest


SessionHandlerDB methods and properties

API reference based on ProcessWire core version 3.0.251