‪TYPO3CMS  ‪main
BeforeUserLogoutEvent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
29 {
30  private bool ‪$shouldLogout = true;
31 
32  public function ‪__construct(
33  private readonly ‪AbstractUserAuthentication $user,
34  private readonly ?‪UserSession $userSession
35  ) {}
36 
38  {
39  return $this->user;
40  }
41 
42  public function ‪disableRegularLogoutProcess(): void
43  {
44  $this->‪shouldLogout = false;
45  }
46 
47  public function ‪enableRegularLogoutProcess(): void
48  {
49  $this->‪shouldLogout = true;
50  }
51 
52  public function ‪shouldLogout(): bool
53  {
55  }
56 
57  public function ‪getUserSession(): ?‪UserSession
58  {
59  return $this->userSession;
60  }
61 }
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\disableRegularLogoutProcess
‪disableRegularLogoutProcess()
Definition: BeforeUserLogoutEvent.php:42
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\__construct
‪__construct(private readonly AbstractUserAuthentication $user, private readonly ?UserSession $userSession)
Definition: BeforeUserLogoutEvent.php:32
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\getUser
‪getUser()
Definition: BeforeUserLogoutEvent.php:37
‪TYPO3\CMS\Core\Session\UserSession
Definition: UserSession.php:45
‪TYPO3\CMS\Core\Authentication\Event
Definition: AbstractAuthenticationFailedEvent.php:18
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\$shouldLogout
‪bool $shouldLogout
Definition: BeforeUserLogoutEvent.php:30
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\enableRegularLogoutProcess
‪enableRegularLogoutProcess()
Definition: BeforeUserLogoutEvent.php:47
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\shouldLogout
‪shouldLogout()
Definition: BeforeUserLogoutEvent.php:52
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent\getUserSession
‪getUserSession()
Definition: BeforeUserLogoutEvent.php:57
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent
Definition: BeforeUserLogoutEvent.php:29
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
Definition: AbstractUserAuthentication.php:65