From 67a8f9dbd4a41a7dccf087b3991d906354f30cff Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Wed, 2 Jan 2019 17:47:53 +0100 Subject: [PATCH] Bugfix - the remote user also has magicLinks again --- src/Model/Contact.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 4a63a6b49a..25434e25a0 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2072,7 +2072,7 @@ class Contact extends BaseObject */ public static function magicLink($contact_url, $url = '') { - if (!local_user()) { + if (!local_user() && remote_user()) { return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url; } @@ -2097,7 +2097,7 @@ class Contact extends BaseObject $contact = DBA::selectFirst('contact', ['id', 'network', 'url', 'uid'], ['id' => $cid]); return self::magicLinkbyContact($contact, $url); - } + } /** * @brief Returns a magic link to authenticate remote visitors @@ -2109,7 +2109,7 @@ class Contact extends BaseObject */ public static function magicLinkbyContact($contact, $url = '') { - if (!local_user() || ($contact['network'] != Protocol::DFRN)) { + if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) { return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url']; }