mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:02:53 +00:00
48535c0959
- Adding App->redirect if both redirects are possible
22 lines
447 B
PHP
22 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');
|
|
}
|