X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRandomProfile.php;h=1821211203dd53359ff2c0694f5efdb5abc1779c;hb=8bbf9e93c61079bfa556d51b3b6e19f80ab8d795;hp=c14e9f6cacbe5af7286205d484c1a91e6442e832;hpb=03038e7a3bb74bdab497d26b7f829a5c3036d1c2;p=friendica.git diff --git a/src/Module/RandomProfile.php b/src/Module/RandomProfile.php index c14e9f6cac..1821211203 100644 --- a/src/Module/RandomProfile.php +++ b/src/Module/RandomProfile.php @@ -1,28 +1,48 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\GContact; /** * Redirects to a random Friendica profile this node knows about */ class RandomProfile extends BaseModule { - public static function content(array $parameters = []) + protected function content(array $request = []): string { $a = DI::app(); - $contactUrl = GContact::getRandomUrl(); + $contact = Contact::getRandomContact(); - if ($contactUrl) { - $link = Contact::magicLink($contactUrl); + if (!empty($contact)) { + $link = Contact::magicLinkByContact($contact); $a->redirect($link); } DI::baseUrl()->redirect('profile'); + + return ''; } }