X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLogout.php;h=bf6a39e19f961a55a38a64b2e9d8ee5a4ecaa77c;hb=1c8dd457cc0676e9f1079f1b7c7fcbb740978930;hp=366f000a8a708f13abccf6f9c542f688067e5bd3;hpb=a5952e5425ee623253b2c91daa873ff6cc63bd39;p=friendica.git diff --git a/src/Module/Logout.php b/src/Module/Logout.php index 366f000a8a..bf6a39e19f 100644 --- a/src/Module/Logout.php +++ b/src/Module/Logout.php @@ -1,29 +1,44 @@ -get_baseurl()); - } -} + + */ +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(); + } + } +}