X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLogout.php;h=bf6a39e19f961a55a38a64b2e9d8ee5a4ecaa77c;hb=1c8dd457cc0676e9f1079f1b7c7fcbb740978930;hp=5c3035eed95bcf90e29808838ba5c68a1d7fa3a4;hpb=2243a82bb46ddfbe723134811dda9d4f89e4f05f;p=friendica.git diff --git a/src/Module/Logout.php b/src/Module/Logout.php index 5c3035eed9..bf6a39e19f 100644 --- a/src/Module/Logout.php +++ b/src/Module/Logout.php @@ -1,29 +1,44 @@ -get_baseurl()); - } -} \ No newline at end of file + + */ +class Logout extends BaseModule +{ + /** + * @brief Process logout requests + */ + public static function init() + { + $visitor_home = null; + if (remote_user()) { + $visitor_home = Profile::getMyURL(); + Cache::delete('zrlInit:' . $visitor_home); + } + + Hook::callAll("logging_out"); + Authentication::deleteSession(); + + if ($visitor_home) { + System::externalRedirect($visitor_home); + } else { + info(L10n::t('Logged out.')); + self::getApp()->internalRedirect(); + } + } +}