]> git.mxchange.org Git - friendica.git/blob - src/Module/Logout.php
Merge pull request #5907 from nupplaphil/goaway_to_redirectto
[friendica.git] / src / Module / Logout.php
1 <?php
2 /**
3  * @file src/Module/Logout.php
4  */
5 namespace Friendica\Module;
6
7 use Friendica\BaseModule;
8 use Friendica\Core\Addon;
9 use Friendica\Core\Authentication;
10 use Friendica\Core\L10n;
11 use Friendica\Core\System;
12
13 require_once 'boot.php';
14
15 /**
16  * Logout module
17  *
18  * @author Hypolite Petovan <hypolite@mrpetovan.com>
19  */
20 class Logout extends BaseModule
21 {
22         /**
23          * @brief Process logout requests
24          */
25         public static function init()
26         {
27                 Addon::callHooks("logging_out");
28                 Authentication::deleteSession();
29                 info(L10n::t('Logged out.') . EOL);
30                 self::getApp()->internalRedirect();
31         }
32 }