friendica_2021.01_tupambae_.../mod/randprof.php
Philipp Holzer 48535c0959
Bugfixing redirects
- Adding App->redirect if both redirects are possible
2018-10-24 20:18:46 +02:00

23 lines
447 B
PHP

<?php
/**
* @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)
{
$x = GContact::getRandomUrl();
if ($x) {
$link = Contact::magicLink($x);
// @TODO making the return of magicLink save to use either externalRedirect or internalRedirect
$a->redirect($link);
}
$a->internalRedirect('profile');
}