activeSessionManager = $activeSessionManager; } public function execute() { if ($sessionId = $this->getRequest()->getParam(ActiveSession::SESSION_ID)) { $this->activeSessionManager->terminate($sessionId); $this->messageManager->addSuccessMessage('Session has been successfully terminated.'); } return $this->resultRedirectFactory->create()->setRefererUrl(); } }