$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];
- if (!empty($item['plink'])) {
+ // Only create a redirection to a magic link when logged in
+ if (!empty($item['plink']) && local_user()) {
$item['plink'] = Contact::magicLinkbyContact($author, $item['plink']);
}
}
$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];
- $profile_link = Contact::magicLinkbyContact($author);
+
+ if (local_user()) {
+ $profile_link = Contact::magicLinkbyContact($author);
+ } else {
+ $profile_link = $item['author-link'];
+ }
+
if (strpos($profile_link, 'redir/') === 0) {
$sparkle = ' sparkle';
}