1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/Util/Webfinger/WebfingerUrl.php
2018-04-19 19:17:15 -06:00

19 lines
No EOL
382 B
PHP

<?php
namespace App\Util\Webfinger;
use App\User;
use App\Util\Lexer\Nickname;
class WebfingerUrl {
public static function generateWebfingerUrl($url)
{
$url = Nickname::normalizeProfileUrl($url);
$domain = $url['domain'];
$username = $url['username'];
$path = "https://{$domain}/.well-known/webfinger?resource={$username}@{$domain}";
return $path;
}
}