X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=6227c0304cb8792b45e8cda332bbcd8a054d6693;hb=cfac13790bc1948697b76b9a6134b61c7bb3173b;hp=a1b9dba22f6e49cdfd846417098073407f96d37f;hpb=a6423031eba1236127160ced3028e36401f40536;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index a1b9dba22f..6227c0304c 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