src/Http/Session/ConcurrentSessionControlAuthenticationStrategy.php
protected function allowedSessionsExceeded($orderedSessions, $allowableSessions, SessionRegistry $registry)
    {
        if ($this->errorIfMaximumExceeded) {
            throw new MaxSessionsExceededException(sprintf('Maximum number of sessions (%s) exceeded', $allowableSessions));
        }

        // Expire oldest session
        $orderedSessionsVector = array_values($orderedSessions);
        for ($i = $allowableSessions - 1, $countSessions = count($orderedSessionsVector); $i < $countSessions; $i++) {
            $registry->expireNow($orderedSessionsVector[$i]->getSessionId());
        }
    }
protected function allowedSessionsExceeded($orderedSessions, $allowableSessions, SessionRegistry $registry)
    {
        if ($this->errorIfMaximumExceeded) {
            throw new MaxSessionsExceededException(sprintf('Maximum number of sessions (%s) exceeded', $allowableSessions));
        }

        // Expire oldest session
        $orderedSessionsVector = array_values($orderedSessions);
        for ($i = $allowableSessions - 1, $countSessions = count($orderedSessionsVector); $i < $countSessions; $i++) {
            $registry->expireNow($orderedSessionsVector[$i]->getSessionId());
        }
    }
protected function allowedSessionsExceeded ( $ orderedSessions , $ allowableSessions , SessionRegistry $ registry ) { if ( $ this -> errorIfMaximumExceeded ) { throw new MaxSessionsExceededException ( sprintf ( 'Maximum number of sessions (%s) exceeded' , $ allowableSessions ) ) ; } // Expire oldest session $ orderedSessionsVector = array_values ( $ orderedSessions ) ; for ( $ i = $ allowableSessions - 1 , $ countSessions = count ( $ orderedSessionsVector ) ; $ i < $ countSessions ; $ i ++ ) { $ registry -> expireNow ( $ orderedSessionsVector [ $ i ] -> getSessionId ( ) ) ; } }
Allows subclasses to customize behavior when too many sessions are detected.

@param Registry\SessionInformation[] $orderedSessions   Array of SessionInformation ordered from newest to oldest
@param int                           $allowableSessions
@param SessionRegistry               $registry
Allows subclasses to customize behavior when too many sessions are detected .