2017-12-17 17:34:43 +01:00
|
|
|
<?php
|
2018-01-22 15:58:51 +01:00
|
|
|
/**
|
|
|
|
* @file src/Module/Logout.php
|
|
|
|
*/
|
2017-12-17 17:34:43 +01:00
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
2018-01-17 19:42:40 +01:00
|
|
|
use Friendica\Core\Addon;
|
2018-01-22 15:58:51 +01:00
|
|
|
use Friendica\Core\L10n;
|
2017-12-17 17:34:43 +01:00
|
|
|
|
|
|
|
require_once 'boot.php';
|
|
|
|
require_once 'include/security.php';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Logout module
|
|
|
|
*
|
|
|
|
* @author Hypolite Petovan mrpetovan@gmail.com
|
|
|
|
*/
|
|
|
|
class Logout extends BaseModule
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @brief Process logout requests
|
|
|
|
*/
|
|
|
|
public static function init()
|
|
|
|
{
|
2018-01-17 19:42:40 +01:00
|
|
|
Addon::callHooks("logging_out");
|
2017-12-17 17:34:43 +01:00
|
|
|
nuke_session();
|
2018-01-22 15:58:51 +01:00
|
|
|
info(L10n::t('Logged out.') . EOL);
|
2017-12-17 17:34:43 +01:00
|
|
|
goaway(self::getApp()->get_baseurl());
|
|
|
|
}
|
2018-01-03 01:37:17 +01:00
|
|
|
}
|