Merge pull request #7152 from annando/fix-ap-mail
[friendica.git/.git] / mod / randprof.php
1 <?php
2 /**
3  * @file mod/randprof.php
4  */
5 use Friendica\App;
6 use Friendica\Model\Contact;
7 use Friendica\Model\GContact;
8
9 function randprof_init(App $a)
10 {
11         $x = GContact::getRandomUrl();
12
13         if ($x) {
14                 $link = Contact::magicLink($x);
15                 $a->redirect($link);
16         }
17
18         $a->internalRedirect('profile');
19 }