mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:40:17 +00:00
Magic links should work again
This commit is contained in:
parent
860338a675
commit
f04bb820ad
1 changed files with 5 additions and 5 deletions
|
@ -2374,10 +2374,6 @@ class Contact extends BaseObject
|
||||||
*/
|
*/
|
||||||
public static function magicLinkByContact($contact, $url = '')
|
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)) {
|
if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) {
|
||||||
return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||||
}
|
}
|
||||||
|
@ -2387,10 +2383,14 @@ class Contact extends BaseObject
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($contact['uid'] != 0) {
|
if (!empty($contact['uid'])) {
|
||||||
return self::magicLink($contact['url'], $url);
|
return self::magicLink($contact['url'], $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($contact['id'])) {
|
||||||
|
return $url ?: $contact['url'];
|
||||||
|
}
|
||||||
|
|
||||||
$redirect = 'redir/' . $contact['id'];
|
$redirect = 'redir/' . $contact['id'];
|
||||||
|
|
||||||
if ($url != '') {
|
if ($url != '') {
|
||||||
|
|
Loading…
Reference in a new issue