forked from GNUsocial/gnu-social
Event handler StartGetProfileAcctUri for WebFinger
This commit is contained in:
parent
9ea57e5cb2
commit
74429835a1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user