]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Remove unreliable ANY_VALUE from message list query
[friendica.git] / mod / randprof.php
index d8cffb380ccd46de6552fb72b12cd576b45de058..d0b3c4ef85dc629aaab75d2def14c449d9ff1737 100644 (file)
@@ -1,14 +1,21 @@
 <?php
+/**
+ * @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) {
-       require_once('include/Contact.php');
-
-       $x = random_profile();
+function randprof_init(App $a)
+{
+       $x = GContact::getRandomUrl();
 
        if ($x) {
-               goaway(zrl($x));
+               $link = Contact::magicLink($x);
+               $a->redirect($link);
        }
 
-       goaway(App::get_baseurl() . '/profile');
+       $a->internalRedirect('profile');
 }