]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
accept profile URL as a LRDD identifier
authorEvan Prodromou <evan@status.net>
Thu, 14 Oct 2010 15:07:37 +0000 (11:07 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 14 Oct 2010 15:07:37 +0000 (11:07 -0400)
plugins/OStatus/actions/userxrd.php

index c9b1d0a5be4effca2c12eb8024059f4f2aa52856..575a07c4098288a636ea56e76c9d7184552e9532 100644 (file)
@@ -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;