summaryrefslogtreecommitdiff
path: root/plugins/OStatus/actions/userxrd.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/actions/userxrd.php')
-rw-r--r--plugins/OStatus/actions/userxrd.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php
index 8179505a5..575a07c40 100644
--- a/plugins/OStatus/actions/userxrd.php
+++ b/plugins/OStatus/actions/userxrd.php
@@ -17,7 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET')) { exit(1); }
+if (!defined('STATUSNET')) {
+ exit(1);
+}
/**
* @package OStatusPlugin
@@ -44,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;