]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Logout.php
fix
[friendica.git] / src / Module / Logout.php
index 1f60e6dc191ceda75990d76dc5878d7182841c29..9e6c674b358c7560dce1027f652268c95a9c5ffa 100644 (file)
@@ -6,9 +6,11 @@
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
-use Friendica\Core\Authentication;
+use Friendica\App\Authentication;
+use Friendica\Core\Cache;
 use Friendica\Core\Hook;
 use Friendica\Core\L10n;
+use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\Model\Profile;
 
@@ -22,15 +24,16 @@ class Logout extends BaseModule
        /**
         * @brief Process logout requests
         */
-       public static function init()
+       public static function init(array $parameters = [])
        {
                $visitor_home = null;
                if (remote_user()) {
                        $visitor_home = Profile::getMyURL();
+                       Cache::delete('zrlInit:' . $visitor_home);
                }
 
                Hook::callAll("logging_out");
-               Authentication::deleteSession();
+               Session::clear();
 
                if ($visitor_home) {
                        System::externalRedirect($visitor_home);