Commit 74429835 authored by mmn's avatar mmn

Event handler StartGetProfileAcctUri for WebFinger

parent 9ea57e5c
......@@ -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;
......
......@@ -31,7 +31,7 @@ class WebFingerResource_Profile extends WebFingerResource
return array_merge($aliases, parent::getAliases());
}
protected function reconstructAcct()
public function reconstructAcct()
{
$acct = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment