]> git.mxchange.org Git - friendica.git/commitdiff
Magic links should work again
authorMichael <heluecht@pirati.ca>
Fri, 10 May 2019 07:38:10 +0000 (07:38 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 10 May 2019 07:38:10 +0000 (07:38 +0000)
src/Model/Contact.php

index 326bae0ff8569882d78f9882a196e0f6e5824705..00a303a8b912cbc11febc51e47ebaba9d8064567 100644 (file)
@@ -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 != '') {