friendica/src/Module/AcctLink.php

27 lines
408 B
PHP
Raw Normal View History

2018-10-13 16:32:14 +00:00
<?php
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Network\Probe;
/**
* Redirects to another URL based on the parameter 'addr'
*/
class AcctLink extends BaseModule
{
public static function content()
{
$addr = defaults($_REQUEST, 'addr', false);
if ($addr) {
$url = defaults(Probe::uri($addr), 'url', false);
if ($url) {
goaway($url);
killme();
}
}
}
}