Event handler StartGetProfileAcctUri for WebFinger

This commit is contained in:
Mikael Nordfeldth 2013-10-28 18:26:00 +01:00
parent 9ea57e5cb2
commit 74429835a1
2 changed files with 13 additions and 1 deletions

View File

@ -58,6 +58,18 @@ class WebFingerPlugin extends Plugin
return true;
}
public function onStartGetProfileAcctUri(Profile $profile, &$acct)
{
$wfr = new WebFingerResource_Profile($profile);
try {
$acct = $wfr->reconstructAcct();
} catch (Exception $e) {
return true;
}
return false;
}
public function onEndGetWebFingerResource($resource, WebFingerResource &$target=null, array $args=array())
{
$profile = null;

View File

@ -31,7 +31,7 @@ class WebFingerResource_Profile extends WebFingerResource
return array_merge($aliases, parent::getAliases());
}
protected function reconstructAcct()
public function reconstructAcct()
{
$acct = null;