* @see wcf\data\DatabaseObject::$databaseTableIndexName
*/
protected static $databaseTableIndexName = 'sessionID';
+
+ /**
+ * Returns true, if this session type supports persistent logins.
+ *
+ * @return boolean
+ */
+ public static function supportsPersistentLogins() {
+ return false;
+ }
}
* @see wcf\data\DatabaseObject::$databaseTableIndexName
*/
protected static $databaseTableIndexName = 'sessionID';
+
+ /**
+ * @see wcf\data\acp\session\ACPSession::supportsPersistentLogins()
+ */
+ public static function supportsPersistentLogins() {
+ return true;
+ }
}
$sessionID = StringUtil::getRandomID();
// get user automatically
- $this->user = UserAuthenticationFactory::getUserAuthentication()->loginAutomatically();
+ $this->user = UserAuthenticationFactory::getUserAuthentication()->loginAutomatically(call_user_func(array($this->sessionClassName, 'supportsPersistentLogins')));
// create user
if ($this->user === null) {
$this->user = new User(null);
}
- // insert session into database
- $requestMethod = (!empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '');
-
// save session
$this->session = call_user_func(array($this->sessionEditorClassName, 'create'), array(
'sessionID' => $sessionID,
'userAgent' => UserUtil::getUserAgent(),
'lastActivityTime' => TIME_NOW,
'requestURI' => UserUtil::getRequestURI(),
- 'requestMethod' => $requestMethod
+ 'requestMethod' => (!empty($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '')
));
}