summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-10-14 11:07:37 -0400
committerEvan Prodromou <evan@status.net>2010-10-14 11:07:37 -0400
commitecb582e41900b9a8fe0cc01eac9c68b4da61d734 (patch)
tree41bb94b214a18571ee7e0f65132c21beef99cb1e
parent23ac9616245f8dfb11e2184f739059d22838010c (diff)
accept profile URL as a LRDD identifier
-rw-r--r--plugins/OStatus/actions/userxrd.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php
index c9b1d0a5b..575a07c40 100644
--- a/plugins/OStatus/actions/userxrd.php
+++ b/plugins/OStatus/actions/userxrd.php
@@ -46,7 +46,15 @@ class UserxrdAction extends XrdAction
}
} else {
$this->user = User::staticGet('uri', $this->uri);
+ if (empty($this->user)) {
+ // try and get it by profile url
+ $profile = Profile::staticGet('profileurl', $this->uri);
+ if (!empty($profile)) {
+ $this->user = User::staticGet('id', $profile->id);
+ }
+ }
}
+
if (!$this->user) {
$this->clientError(_m('No such user.'), 404);
return false;