]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Merge pull request #6321 from MrPetovan/bug/6316-escape-event-output
[friendica.git] / mod / randprof.php
index c5154c12d0b1292ef39fced53c93ef88aadc3e66..d0b3c4ef85dc629aaab75d2def14c449d9ff1737 100644 (file)
@@ -4,6 +4,7 @@
  */
 use Friendica\App;
 use Friendica\Core\System;
+use Friendica\Model\Contact;
 use Friendica\Model\GContact;
 use Friendica\Model\Profile;
 
@@ -12,8 +13,9 @@ function randprof_init(App $a)
        $x = GContact::getRandomUrl();
 
        if ($x) {
-               goaway(Profile::zrl($x));
+               $link = Contact::magicLink($x);
+               $a->redirect($link);
        }
 
-       goaway(System::baseUrl() . '/profile');
+       $a->internalRedirect('profile');
 }