concrete/controllers/single_page/dashboard/system/registration/automated_logout.php
public function invalidate_sessions($token = '')
    {
        if (!$this->token->validate('invalidate_sessions', $token)) {
            $this->error->add($this->token->getErrorMessage());

            $this->flash('error', $this->error);

            // Redirect away from this save endpoint
            return $this->factory->redirect($this->action());
        }

        // Invalidate all sessions
        $this->invalidateSessions();

        // Set a message for the login page
        $this->flash('error', t('All sessions have been invalidated. You must log back in to continue.'));

        // Redirect to the login page
        return $this->factory->redirect($this->urls->resolve(['/login']));
    }
public function invalidate_sessions($token = '')
    {
        if (!$this->token->validate('invalidate_sessions', $token)) {
            $this->error->add($this->token->getErrorMessage());

            $this->flash('error', $this->error);

            // Redirect away from this save endpoint
            return $this->factory->redirect($this->action());
        }

        // Invalidate all sessions
        $this->invalidateSessions();

        // Set a message for the login page
        $this->flash('error', t('All sessions have been invalidated. You must log back in to continue.'));

        // Redirect to the login page
        return $this->factory->redirect($this->urls->resolve(['/login']));
    }
public function invalidate_sessions ( $ token = '' ) { if ( ! $ this -> token -> validate ( 'invalidate_sessions' , $ token ) ) { $ this -> error -> add ( $ this -> token -> getErrorMessage ( ) ) ; $ this -> flash ( 'error' , $ this -> error ) ; // Redirect away from this save endpoint return $ this -> factory -> redirect ( $ this -> action ( ) ) ; } // Invalidate all sessions $ this -> invalidateSessions ( ) ; // Set a message for the login page $ this -> flash ( 'error' , t ( 'All sessions have been invalidated. You must log back in to continue.' ) ) ; // Redirect to the login page return $ this -> factory -> redirect ( $ this -> urls -> resolve ( [ '/login' ] ) ) ; }
An action for invalidating all active sessions

@param string $token The CSRF token used to validate this request

@return \Concrete\Core\Http\Response|void
An action for invalidating all active sessions