]> git.mxchange.org Git - friendica.git/blob - src/Module/Logout.php
Renaming functions + moving functions from security to Model/Item and BaseModule...
[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
12 require_once 'boot.php';
13
14 /**
15  * Logout module
16  *
17  * @author Hypolite Petovan <hypolite@mrpetovan.com>
18  */
19 class Logout extends BaseModule
20 {
21         /**
22          * @brief Process logout requests
23          */
24         public static function init()
25         {
26                 Addon::callHooks("logging_out");
27                 Authentication::deleteSession();
28                 info(L10n::t('Logged out.') . EOL);
29                 goaway(self::getApp()->getBaseURL());
30         }
31 }