30743ba9286884710bdaedd4369b3172b73e49b0
3 namespace wcf\data\acp\session
;
5 use wcf\data\DatabaseObject
;
9 * Represents an ACP session.
11 * @author Alexander Ebert
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 * @property-read string $sessionID unique textual identifier of the acp session
16 * @property-read int|null $userID id of the user the acp session belongs to or `null` if the acp session belongs to a guest
17 * @property-read string $ipAddress id of the user whom the acp session belongs to
18 * @property-read string $userAgent user agent of the user whom the acp session belongs to
19 * @property-read int $lastActivityTime timestamp at which the latest activity occurred
20 * @property-read string $requestURI uri of the latest request
21 * @property-read string $requestMethod used request method of the latest request (`GET`, `POST`)
22 * @property-read string $sessionVariables serialized array with variables stored on a session-basis
23 * @deprecated 5.4 Distinct ACP sessions have been removed. This class is preserved due to its use in legacy sessions.
25 class ACPSession
extends DatabaseObject
30 protected static $databaseTableIndexIsIdentity = false;
33 * Returns true if this session type supports persistent logins.
37 public static function supportsPersistentLogins()
43 * Returns the existing session object for given user id or null if there
49 public static function getSessionByUserID($userID)
52 FROM " . static::getDatabaseTableName() . "
54 $statement = WCF
::getDB()->prepareStatement($sql);
55 $statement->execute([$userID]);
57 return $statement->fetchObject(static::class);