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