2012-04-10 20:50:31 -07:00
|
|
|
<?php
|
2018-01-14 21:22:39 -05:00
|
|
|
/**
|
|
|
|
* @file mod/randprof.php
|
|
|
|
*/
|
2017-04-30 00:07:00 -04:00
|
|
|
use Friendica\App;
|
2018-06-02 08:05:06 +00:00
|
|
|
use Friendica\Model\Contact;
|
2017-12-07 09:09:28 -05:00
|
|
|
use Friendica\Model\GContact;
|
2016-02-07 15:11:34 +01:00
|
|
|
|
2018-01-14 21:22:39 -05:00
|
|
|
function randprof_init(App $a)
|
|
|
|
{
|
2017-12-07 09:09:28 -05:00
|
|
|
$x = GContact::getRandomUrl();
|
2016-12-20 11:38:16 +01:00
|
|
|
|
|
|
|
if ($x) {
|
2018-10-20 01:00:01 +02:00
|
|
|
$link = Contact::magicLink($x);
|
2018-10-24 20:16:14 +02:00
|
|
|
$a->redirect($link);
|
2016-12-20 11:38:16 +01:00
|
|
|
}
|
|
|
|
|
2018-10-19 20:11:27 +02:00
|
|
|
$a->internalRedirect('profile');
|
2012-04-10 20:50:31 -07:00
|
|
|
}
|