]> git.mxchange.org Git - friendica.git/blobdiff - mod/randprof.php
Move mod/home to src/Module/Home
[friendica.git] / mod / randprof.php
index 055b3dcbe8650b9d86d725085045dea48e78b2ae..10bff588ef3a2d6f925d9875e9d0f1dd31eb430c 100644 (file)
@@ -3,10 +3,8 @@
  * @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)
 {
@@ -14,12 +12,7 @@ function randprof_init(App $a)
 
        if ($x) {
                $link = Contact::magicLink($x);
-               // @TODO making the return of magicLink save to use either externalRedirect or internalRedirect
-               if (filter_var($link, FILTER_VALIDATE_URL)) {
-                       System::externalRedirect($link);
-               } else {
-                       $a->internalRedirect($link);
-               }
+               $a->redirect($link);
        }
 
        $a->internalRedirect('profile');