VarcharDatabaseTableColumn::create('ipAddress')
->length(39)
->defaultValue(''),
+ NotNullInt10DatabaseTableColumn::create('creationTime'),
NotNullInt10DatabaseTableColumn::create('lastActivityTime')
->defaultValue(0),
MediumblobDatabaseTableColumn::create('sessionVariables'),
}
$sql = "INSERT INTO wcf" . WCF_N . "_user_session
- (sessionID, userID, userAgent, ipAddress, lastActivityTime, sessionVariables)
- VALUES (?, ?, ?, ?, ?, ?)";
+ (sessionID, userID, userAgent, ipAddress, creationTime, lastActivityTime, sessionVariables)
+ VALUES (?, ?, ?, ?, ?, ?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
$klass = new \ReflectionClass(SessionHandler::getInstance());
SessionHandler::getInstance()->userID,
SessionHandler::getInstance()->userAgent,
SessionHandler::getInstance()->ipAddress,
- SessionHandler::getInstance()->lastActivityTime,
+ TIME_NOW,
+ TIME_NOW,
\serialize([
'acp' => $variables,
'frontend' => [],
// Create new session.
$sql = "INSERT INTO wcf" . WCF_N . "_user_session
- (sessionID, ipAddress, userAgent, lastActivityTime, sessionVariables)
- VALUES (?, ?, ?, ?, ?)";
+ (sessionID, ipAddress, userAgent, creationTime, lastActivityTime, sessionVariables)
+ VALUES (?, ?, ?, ?, ?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute([
$this->sessionID,
UserUtil::getIpAddress(),
UserUtil::getUserAgent(),
TIME_NOW,
+ TIME_NOW,
\serialize($variables),
]);
userID INT(10),
ipAddress VARCHAR(39) NOT NULL DEFAULT '',
userAgent VARCHAR(255) NOT NULL DEFAULT '',
+ creationTime INT(10) NOT NULL,
lastActivityTime INT(10) NOT NULL DEFAULT 0,
sessionVariables MEDIUMBLOB,
KEY (userID),