]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_poll.php
Merge pull request #476 from pixelroot/master
[friendica.git] / mod / dfrn_poll.php
index f3c14541024f39a0d9e4e4e2b20b62bae510039b..0d703dfb3122523a2b3484665e91ead80cef7e2d 100644 (file)
@@ -87,6 +87,11 @@ function dfrn_poll_init(&$a) {
 
                                if((int) $xml->status == 1) {
                                        $_SESSION['authenticated'] = 1;
+                                       if(! x($_SESSION,'remote'))
+                                               $_SESSION['remote'] = array();
+
+                                       $_SESSION['remote'][] = array('cid' => $r[0]['id'],'uid' => $r[0]['uid'],'url' => $r[0]['url']);
+
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
                                        $_SESSION['visitor_handle'] = $r[0]['addr'];
@@ -516,6 +521,9 @@ function dfrn_poll_content(&$a) {
                                
                                if(((int) $xml->status == 0) && ($xml->challenge == $hash)  && ($xml->sec == $sec)) {
                                        $_SESSION['authenticated'] = 1;
+                                       if(! x($_SESSION,'remote'))
+                                               $_SESSION['remote'] = array();
+                                       $_SESSION['remote'][] = array('cid' => $r[0]['id'],'uid' => $r[0]['uid'],'url' => $r[0]['url']);
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
                                        $_SESSION['visitor_visiting'] = $r[0]['uid'];