aboutsummaryrefslogtreecommitdiffstats
path: root/mod/redir.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/redir.php')
-rw-r--r--mod/redir.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/redir.php b/mod/redir.php
index ea1aec6e9..88b291146 100644
--- a/mod/redir.php
+++ b/mod/redir.php
@@ -4,17 +4,20 @@ function redir_init(&$a) {
if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1])))
goaway($a->get_baseurl());
- $r = q("SELECT `issued-id`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[1]),
intval($_SESSION['uid']));
if(! count($r))
goaway($a->get_baseurl());
+
+ $dfrn_id = (($r[0]['duplex']) ? $r[0]['dfrn-id'] : $r[0]['issued-id']);
+
q("INSERT INTO `profile_check` ( `uid`, `dfrn_id`, `expire`)
VALUES( %d, '%s', %d )",
intval($_SESSION['uid']),
- dbesc($r[0]['issued-id']),
+ dbesc($dfrn_id),
intval(time() + 45));
- goaway ($r[0]['poll'] . '?dfrn_id=' . $r[0]['issued-id'] . '&type=profile');
+ goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id . '&type=profile');