*/
public static function magicLinkByContact($contact, $url = '')
{
+ $destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
+
if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) {
- return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
+ return $destination;
}
// Only redirections to the same host do make sense
}
if (empty($contact['id'])) {
- return $url ?: $contact['url'];
+ return $destination;
}
$redirect = 'redir/' . $contact['id'];