From f04bb820ad3cb70a29a10b53e4a0572f9828543c Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 10 May 2019 07:38:10 +0000 Subject: [PATCH] Magic links should work again --- src/Model/Contact.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 326bae0ff8..00a303a8b9 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2374,10 +2374,6 @@ class Contact extends BaseObject */ public static function magicLinkByContact($contact, $url = '') { - if (empty($contact['id']) || empty($contact['uid'])) { - return $url ?: $contact['url']; - } - if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) { return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url']; } @@ -2387,10 +2383,14 @@ class Contact extends BaseObject return $url; } - if ($contact['uid'] != 0) { + if (!empty($contact['uid'])) { return self::magicLink($contact['url'], $url); } + if (empty($contact['id'])) { + return $url ?: $contact['url']; + } + $redirect = 'redir/' . $contact['id']; if ($url != '') { -- 2.39.5