aboutsummaryrefslogtreecommitdiffstats
path: root/mod/xrd.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-25 21:52:30 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-25 21:52:30 -0700
commitc16f314ec348205f4741e0171335168720e652d2 (patch)
tree008aaaf38da2b478eca0a91a0cf4de7bb08dd26f /mod/xrd.php
parent1335ef759522ef9f877c8e8fd806cf9bba36297d (diff)
downloadvolse-hubzilla-c16f314ec348205f4741e0171335168720e652d2.tar.gz
volse-hubzilla-c16f314ec348205f4741e0171335168720e652d2.tar.bz2
volse-hubzilla-c16f314ec348205f4741e0171335168720e652d2.zip
two-way subscriptions working with federated social accounts
Diffstat (limited to 'mod/xrd.php')
-rw-r--r--mod/xrd.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/mod/xrd.php b/mod/xrd.php
index 47516e8dd..0b4bd0d1e 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -5,11 +5,16 @@ require_once('salmon.php');
function xrd_content(&$a) {
$uri = urldecode(notags(trim($_GET['uri'])));
- $local = str_replace('acct:', '', $uri);
- if(substr($local,0,2) == '//')
- $local = substr($local,2);
- $name = substr($local,0,strpos($local,'@'));
+ if(substr($uri,0,4) === 'http')
+ $name = basename($uri);
+ else {
+ $local = str_replace('acct:', '', $uri);
+ if(substr($local,0,2) == '//')
+ $local = substr($local,2);
+
+ $name = substr($local,0,strpos($local,'@'));
+ }
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($name)