2018-02-09 03:49:49 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @file src/Module/Logout.php
|
|
|
|
*/
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
|
|
|
use Friendica\Core\Addon;
|
2018-10-17 12:19:58 +00:00
|
|
|
use Friendica\Core\Authentication;
|
2018-02-09 03:49:49 +00:00
|
|
|
use Friendica\Core\L10n;
|
|
|
|
|
|
|
|
require_once 'boot.php';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Logout module
|
|
|
|
*
|
2018-09-15 23:28:38 +00:00
|
|
|
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
2018-02-09 03:49:49 +00:00
|
|
|
*/
|
|
|
|
class Logout extends BaseModule
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @brief Process logout requests
|
|
|
|
*/
|
|
|
|
public static function init()
|
|
|
|
{
|
|
|
|
Addon::callHooks("logging_out");
|
2018-10-17 12:19:58 +00:00
|
|
|
Authentication::nuke_session();
|
2018-02-09 03:49:49 +00:00
|
|
|
info(L10n::t('Logged out.') . EOL);
|
2018-10-09 17:58:58 +00:00
|
|
|
goaway(self::getApp()->getBaseURL());
|
2018-02-09 03:49:49 +00:00
|
|
|
}
|
|
|
|
}
|