mirror of
https://github.com/friendica/friendica
synced 2024-12-23 16:40:17 +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');
|
|
}
|