3 * @file mod/randprof.php
6 use Friendica\Core\System;
7 use Friendica\Model\Contact;
8 use Friendica\Model\GContact;
9 use Friendica\Model\Profile;
11 function randprof_init(App $a)
13 $x = GContact::getRandomUrl();
16 $link = Contact::magicLink($x);
17 // @TODO making the return of magicLink save to use either externalRedirect or internalRedirect
18 if (filter_var($link, FILTER_VALIDATE_URL)) {
19 System::externalRedirect($link);
21 $a->internalRedirect($link);
25 $a->internalRedirect('profile');