return false;
}
- /**
- * Returns true if this session type supports virtual sessions (sharing the same
- * session among multiple clients).
- *
- * @return boolean
- */
- public static function supportsVirtualSessions() {
- return true;
- }
-
/**
* Returns the existing session object for given user id or null if there
* is no such session.
*/
protected $sessionEditorClassName = '';
- /**
- * virtual session support
- * @var boolean
- */
- protected $supportsVirtualSessions = false;
-
/**
* style id
* @var integer
public function load($sessionEditorClassName, $sessionID) {
$this->sessionEditorClassName = $sessionEditorClassName;
$this->sessionClassName = call_user_func([$sessionEditorClassName, 'getBaseClass']);
- $this->supportsVirtualSessions = call_user_func([$this->sessionClassName, 'supportsVirtualSessions']);
// try to get existing session
if (!empty($sessionID)) {
// guest -> user (login)
//
default:
- if (!$this->supportsVirtualSessions) {
- // delete all other sessions of this user
- call_user_func([$this->sessionEditorClassName, 'deleteUserSessions'], [$user->userID]);
- }
-
// find existing session for this user
$session = call_user_func([$this->sessionClassName, 'getSessionByUserID'], $user->userID);