]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Uncommon logger levels in Friendica (#5453)
[friendica.git] / mod / randprof.php
index 877bf818b906f70b8fd679dfabce883d4e82ce80..18bcb236f8a98504e94acbe860b41c2d2ee82e08 100644 (file)
@@ -1,10 +1,20 @@
 <?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)
+{
+       $x = GContact::getRandomUrl();
 
-function randprof_init(&$a) {
-       require_once('include/Contact.php');
-       $x = random_profile();
-       if($x)
-               goaway(zrl($x));
-       goaway(App::get_baseurl() . '/profile');
+       if ($x) {
+               goaway(Contact::magicLink($x));
+       }
+
+       goaway(System::baseUrl() . '/profile');
 }