From 74429835a1df34c3f3b7da3ebdfa62ee9c9618cc Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 28 Oct 2013 18:26:00 +0100 Subject: [PATCH] Event handler StartGetProfileAcctUri for WebFinger --- plugins/WebFinger/WebFingerPlugin.php | 12 ++++++++++++ plugins/WebFinger/lib/webfingerresource/profile.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/WebFinger/WebFingerPlugin.php b/plugins/WebFinger/WebFingerPlugin.php index 24200a6f36..7e3453ffb2 100644 --- a/plugins/WebFinger/WebFingerPlugin.php +++ b/plugins/WebFinger/WebFingerPlugin.php @@ -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; diff --git a/plugins/WebFinger/lib/webfingerresource/profile.php b/plugins/WebFinger/lib/webfingerresource/profile.php index 03dd84e0ef..76987cb3ef 100644 --- a/plugins/WebFinger/lib/webfingerresource/profile.php +++ b/plugins/WebFinger/lib/webfingerresource/profile.php @@ -31,7 +31,7 @@ class WebFingerResource_Profile extends WebFingerResource return array_merge($aliases, parent::getAliases()); } - protected function reconstructAcct() + public function reconstructAcct() { $acct = null; -- 2.39.5