]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Merge pull request #8753 from MrPetovan/bug/fatal-errors
[friendica.git] / mod / follow.php
index 36eea571945928da11c1b0db815915fcb2a082b9..8910f54c0c086ebb1cdeaf3f579ac9b514e8f3ec 100644 (file)
@@ -40,15 +40,14 @@ function follow_post(App $a)
                DI::baseUrl()->redirect('contact');
        }
 
-       $uid = local_user();
-       $url = Strings::escapeTags(trim($_REQUEST['url']));
+       $url = Probe::cleanURI($_REQUEST['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($uid, $url, true);
+       $result = Contact::createFromProbe($a->user, $url, true);
 
        if ($result['success'] == false) {
                // Possibly it is a remote item and not an account