]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Move mod/home to src/Module/Home
[friendica.git] / mod / randprof.php
index 38d05c53e4308814b1a85ea28f468afe4dd93646..10bff588ef3a2d6f925d9875e9d0f1dd31eb430c 100644 (file)
@@ -1,15 +1,19 @@
 <?php
-
+/**
+ * @file mod/randprof.php
+ */
 use Friendica\App;
-use Friendica\Core\System;
-use Friendica\Model\GlobalContact;
+use Friendica\Model\Contact;
+use Friendica\Model\GContact;
 
-function randprof_init(App $a) {
-       $x = GlobalContact::getRandomUrl();
+function randprof_init(App $a)
+{
+       $x = GContact::getRandomUrl();
 
        if ($x) {
-               goaway(zrl($x));
+               $link = Contact::magicLink($x);
+               $a->redirect($link);
        }
 
-       goaway(System::baseUrl() . '/profile');
+       $a->internalRedirect('profile');
 }