X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLogout.php;h=bf6a39e19f961a55a38a64b2e9d8ee5a4ecaa77c;hb=1c8dd457cc0676e9f1079f1b7c7fcbb740978930;hp=0c8a617b224a39fcefce99a9e0a65f4934a7fc4c;hpb=5640c42469b8ec1c5731b599b0dc9d9a0e762ce6;p=friendica.git diff --git a/src/Module/Logout.php b/src/Module/Logout.php index 0c8a617b22..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(); + } + } +}