Unify the terms 'Staff' and 'Team'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / action / LogoutAction.class.php
... / ...
CommitLineData
1<?php
2
3namespace wcf\action;
4
5use Laminas\Diactoros\Response\RedirectResponse;
6use wcf\system\request\LinkHandler;
7use wcf\system\WCF;
8
9/**
10 * Does the user logout.
11 *
12 * @author Marcel Werk
13 * @copyright 2001-2019 WoltLab GmbH
14 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 */
16class LogoutAction extends \wcf\acp\action\LogoutAction
17{
18 const AVAILABLE_DURING_OFFLINE_MODE = true;
19
20 /**
21 * @inheritDoc
22 */
23 public function execute()
24 {
25 AbstractSecureAction::execute();
26
27 WCF::getSession()->delete();
28
29 $this->executed();
30
31 return new RedirectResponse(
32 LinkHandler::getInstance()->getLink()
33 );
34 }
35}