X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fredir.php;h=4dbae5498b38f24079f75507f61fc8e70fce1a6a;hb=6c341962648b73c935c2de26996b07332b776a1f;hp=f8dfa3ab9fe8e115191b42d29758c8ce87b06da2;hpb=6510df410d45c9e442c6981db40f07cc600df725;p=friendica.git diff --git a/mod/redir.php b/mod/redir.php index f8dfa3ab9f..4dbae5498b 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -3,7 +3,6 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\Logger; -use Friendica\Core\Protocol; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Model\Contact; @@ -83,14 +82,15 @@ function redir_init(App $a) { // When the remote page does support OWA, then we enforce the use of it $basepath = Contact::getBasepath($contact_url); - $serverret = Network::curl($basepath . '/magic'); - if ($serverret->isSuccess()) { - $contact['issued-id'] = ''; - $contact['dfrn-id'] = ''; + if ($basepath == System::baseUrl()) { + $use_magic = true; + } else { + $serverret = Network::curl($basepath . '/magic'); + $use_magic = $serverret->isSuccess(); } // Doing remote auth with dfrn. - if (local_user() && (!empty($contact['dfrn-id']) || !empty($contact['issued-id'])) && empty($contact['pending'])) { + if (local_user() && !$use_magic && (!empty($contact['dfrn-id']) || !empty($contact['issued-id'])) && empty($contact['pending'])) { $dfrn_id = $orig_id = (($contact['issued-id']) ? $contact['issued-id'] : $contact['dfrn-id']); if ($contact['duplex'] && $contact['issued-id']) {