X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=818a1ae5e95c7dd6ac0291655a2d50799ef5d526;hb=98f55ddb2ba8888dfc75845ed5aaa4c663b90b64;hp=a1b9dba22f6e49cdfd846417098073407f96d37f;hpb=8a3995a740a109b2bcac9b88fee6ecc55dd97c85;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index a1b9dba22f..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