X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=818a1ae5e95c7dd6ac0291655a2d50799ef5d526;hb=3444c29b0bf56b84d58516991f65cebb03fb627e;hp=ed8e3aa5fee881bd470d308be901fa3adb613809;hpb=53e38b03130ea798bba44db44ccb7f331dc4b91d;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index ed8e3aa5fe..818a1ae5e9 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -1,6 +1,6 @@ t('Permission denied.')); @@ -139,9 +134,6 @@ function follow_content(App $a) $myaddr = $owner['url']; - // Makes the connection request for friendica contacts easier - $_SESSION['fastlane'] = $contact['url']; - $o = Renderer::replaceMacros($tpl, [ '$header' => DI::l10n()->t('Connect/Follow'), '$pls_answer' => DI::l10n()->t('Please answer the following:'), @@ -164,8 +156,8 @@ function follow_content(App $a) DI::page()['aside'] = ''; - if ($protocol != Protocol::PHANTOM) { - Profile::load($a, '', $contact, false); + if (!in_array($protocol, [Protocol::PHANTOM, Protocol::MAIL])) { + DI::page()['aside'] = Widget\VCard::getHTML($contact); $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), ['$title' => DI::l10n()->t('Status Messages and Posts')] @@ -182,11 +174,7 @@ function follow_process(App $a, string $url) { $return_path = 'follow?url=' . urlencode($url); - // Makes the connection request for friendica contacts easier - // This is just a precaution if maybe this page is called somewhere directly via POST - $_SESSION['fastlane'] = $url; - - $result = Contact::createFromProbe($a->user, $url, true); + $result = Contact::createFromProbeForUser($a->getLoggedInUserId(), $url); if ($result['success'] == false) { // Possibly it is a remote item and not an account