Improve PR 5984: better check for remote users as well
This commit is contained in:
parent
1176a4240a
commit
8e11f055b1
2 changed files with 2 additions and 2 deletions
|
@ -354,7 +354,7 @@ function localize_item(&$item)
|
|||
'network' => $item['author-network'], 'url' => $item['author-link']];
|
||||
|
||||
// Only create a redirection to a magic link when logged in
|
||||
if (!empty($item['plink']) && local_user()) {
|
||||
if (!empty($item['plink']) && (local_user() || remote_user())) {
|
||||
$item['plink'] = Contact::magicLinkbyContact($author, $item['plink']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ class Post extends BaseObject
|
|||
$author = ['uid' => 0, 'id' => $item['author-id'],
|
||||
'network' => $item['author-network'], 'url' => $item['author-link']];
|
||||
|
||||
if (local_user()) {
|
||||
if (local_user() || remote_user()) {
|
||||
$profile_link = Contact::magicLinkbyContact($author);
|
||||
} else {
|
||||
$profile_link = $item['author-link'];
|
||||
|
|
Loading…
Reference in a new issue