]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Move mod/home to src/Module/Home
[friendica.git] / mod / randprof.php
index c5154c12d0b1292ef39fced53c93ef88aadc3e66..10bff588ef3a2d6f925d9875e9d0f1dd31eb430c 100644 (file)
@@ -3,17 +3,17 @@
  * @file mod/randprof.php
  */
 use Friendica\App;
-use Friendica\Core\System;
+use Friendica\Model\Contact;
 use Friendica\Model\GContact;
-use Friendica\Model\Profile;
 
 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');
 }