On session started
336975
@Override
  public void onSessionStarted(Session session) {
    session.setUseBlockingRead(true);
    session.setAttribute(HEART_BEAT_FAIL_COUNT_ATTR, new AtomicInteger(0));
    for (MemcachedClientStateListener listener : this.client.getStateListeners()) {
      listener.onConnected(this.client, session.getRemoteSocketAddress());
    }
    this.listener.onConnect((MemcachedTCPSession) session, this.client);
  }
424453
public void onInit() {

        String authToken = m_params.getAuthToken();
        if (authToken != null) {
            m_ui.showForgotPasswordView(authToken);
        } else if (m_params.isReset()) {
            m_ui.showPasswordResetDialog();
        } else {
            boolean loggedIn = !A_CmsUI.getCmsObject().getRequestContext().getCurrentUser().isGuestUser();
            m_ui.setSelectableOrgUnits(CmsLoginHelper.getOrgUnitsForLoginDialog(A_CmsUI.getCmsObject(), null));
            if (loggedIn) {
                if (m_params.isLogout()) {
                    logout();
                } else {
                    m_ui.showAlreadyLoggedIn();
                }
            } else {
                m_ui.showLoginView(m_params.getOufqn());
            }
        }

    }
503802
protected function startSession()
    {
        if (session_status() == PHP_SESSION_NONE) {

            session_start();

            if(!$this->expireOnClose) {
                setcookie('planet_session', session_id(), time() + ($this->expireTime * 60 ), '/', null, false, false);
            }
        }
    }
623267
public function start_session() {
		$session = $this->get_store();

		$session_name = $session->get_name();

		$session->set_id( isset( $_COOKIE[ $session_name ] ) ? sanitize_text_field( $_COOKIE[ $session_name ] ) : null );

		$session->start();

		if ( ! $this->running_in_cli() ) {
			// Add the session identifier to cookie, so we can re-use that in lifetime.
			$expiration_date = $this->config['expire_on_close'] ? 0 : time() + $this->lifetime_in_seconds();

			setcookie( $session->get_name(), $session->get_id(), $expiration_date, COOKIEPATH ?: '/', COOKIE_DOMAIN, is_ssl() );
		}
	}
1319430
public boolean startSession() {

        synchronized (sharedLock) {
            SessionData session = loadSession();
            if (isSessionActive(session)) {
                sharedLock.notifyAll();
                return false;
            } else {
                clearAll();
            }
            sharedLock.notifyAll();
        }

        return true;
    }
653926
def init_session(self):
        
        # Clear out previous session's restoration files
        for status in Status:
            path = self.get_restore_path(status)
            if os.path.isfile(path):
                os.remove(path)

        self.__record_progress()
        self.__record_progress(Status.CONSTRUCT_CHANNEL)
1228433
public function session_init()
    {
        parent::session_init();

        // set initial session vars
        if (!$_SESSION['user_id']) {
            $_SESSION['temp'] = true;
        }

        // restore skin selection after logout
        if ($_SESSION['temp'] && !empty($_SESSION['skin'])) {
            $this->config->set('skin', $_SESSION['skin']);
        }
    }
176468
def start(self):
        ''''''
        self._current_session = session = self._http_client.session()

        request = self.next_request()
        assert request

        if request.url_info.password or \
                request.url_info.hostname_with_port in self._hostnames_with_auth:
            self._add_basic_auth_header(request)

        response = yield from session.start(request)

        self._process_response(response)

        return response
771738
private function sessionStart()
    {
        if (session_status() !== PHP_SESSION_ACTIVE) {
            $request = new Request;
            session_set_cookie_params(
                0,
                $request->getBasePath(),
                null,
                $request->getUri()->getScheme() === 'https',
                true
            );
            session_start();
        }
    }
955291
public function sessionStart()
    {
        if ( $this->storage && !$this->storage->isStarted() )
        {
            $this->storage->start();
        }

        return true;
    }
931851
public function onReady()
    {
        $this->redis = \PHPDaemon\Clients\Redis\Pool::getInstance($this->config->redisname->value);
        $this->sessions = new ObjectStorage;
        $this->wss = new ObjectStorage;
        foreach (preg_split('~\s*;\s*~', $this->config->wssname->value) as $wssname) {
            $this->attachWss(WebSocketPool::getInstance(trim($wssname)));
        }
    }
1162646
private function loadSession() {

		$session = &$_SESSION;
		
		$this->sessionDataBag->initialize($session);

		$this->started = TRUE;

	}
20568
protected function checkStarted(): bool
    {
        if (!$this->started) {
            $this->started = self::sessionStart();
        }
        if (isset($_SESSION[$this->namespace]) && !is_array($_SESSION[$this->namespace])) {
            $_SESSION[$this->namespace] = [];
        }
        return (bool) $this->started;
    }
1146837
public function open()
    {
        if ($this->getIsActive()) {
            return;
        }

        $this->registerSessionHandler();

        $this->setCookieParamsInternal();

        YII_DEBUG ? session_start() : @session_start();

        if ($this->getIsActive()) {
            Yii::info('Session started', __METHOD__);
            $this->updateFlashCounters();
        } else {
            $error = error_get_last();
            $message = $error['message'] ?? 'Failed to start session.';
            Yii::error($message, __METHOD__);
        }
    }
886423
protected void startSession (Name authname, AuthRequest req, PresentsConnection conn,
        Object authdata)
    {
        _authname = authname;
        _areq = req;
        _authdata = authdata;
        setConnection(conn);

        // resolve our client object before we get fully underway
        _clmgr.resolveClientObject(_authname, this);

        // make a note of our session start time
        _sessionStamp = System.currentTimeMillis();
    }
586298
public function start()
	{
		if ($this->state === 'active')
		{
			return;
		}

		$this->_start();

		$this->state = 'active';

		// Initialise the session
		$this->_setCounter();
		$this->_setTimers();

		// Perform security checks
		$this->_validate();

		if ($this->dispatcher instanceof Dispatcher)
		{
			$this->dispatcher->trigger('onAfterSessionStart');
		}
	}
977380
def fin_session(self):
		
		self.__prompt_show = False
		self.__history.add(self.row())
		self.exec(self.row())