From 58fb0beaa3b518e9e72e0610aad514bd6bc8ab8f Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 29 Sep 2019 06:26:02 +0000 Subject: [PATCH] Delete the cache entry allowing direct login again --- src/Model/Profile.php | 4 +--- src/Module/Logout.php | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 01c5851392..b275d31add 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -1074,9 +1074,7 @@ class Profile // We need to extract the basebath from the profile url // to redirect the visitors '/magic' module. - // Note: We should have the basepath of a contact also in the contact table. - $urlarr = explode('/profile/', $contact['url']); - $basepath = $urlarr[0]; + $basepath = Contact::getBasepath($contact['url']); if ($basepath != $a->getBaseURL() && !strstr($dest, '/magic') && !strstr($dest, '/rmagic')) { $magic_path = $basepath . '/magic' . '?f=&owa=1&dest=' . $dest; diff --git a/src/Module/Logout.php b/src/Module/Logout.php index 1f60e6dc19..bf6a39e19f 100644 --- a/src/Module/Logout.php +++ b/src/Module/Logout.php @@ -7,6 +7,7 @@ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\Core\Authentication; +use Friendica\Core\Cache; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\System; @@ -27,6 +28,7 @@ class Logout extends BaseModule $visitor_home = null; if (remote_user()) { $visitor_home = Profile::getMyURL(); + Cache::delete('zrlInit:' . $visitor_home); } Hook::callAll("logging_out");