public static function getSession($userId, $sessionHash = '', &$dBAssertor = null, &$datastore = null, &$config = null) { $dBAssertor = $dBAssertor ? $dBAssertor : vB::getDbAssertor(); $datastore = $datastore ? $datastore : vB::getDatastore(); $config = $config ? $config : vB::getConfig(); $restoreSessionInfo = array('userid' => $userId); $session = new vB_Session_Web($dBAssertor, $datastore, $config, $sessionHash, $restoreSessionInfo); $session->set('userid', $userId); $session->fetch_userinfo(); return $session; }
protected function __construct(&$dBAssertor, &$datastore, &$config, $sessionhash = '', $restoreSessionInfo, $styleid = 0, $languageid = 0) { parent::__construct($dBAssertor, $datastore, $config, $sessionhash, $restoreSessionInfo, $styleid, $languageid); }
/** * starts a new lightweight (no shutdown) guest session and returns the session object. * * @return vB_Session session data. */ public function getGuestSession() { $session = vB_Session_Web::getSession(0, ''); $languageid = vB::getDatastore()->getOption('languageid'); $session->set('languageid', $languageid); vB::skipShutdown(true); vB::setCurrentSession($session); return $session; }