X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_poll.php;h=0d703dfb3122523a2b3484665e91ead80cef7e2d;hb=7ae1e4620de35329350fd54b3598666e143ea0a0;hp=436727a78fca603bcb1e00c04ddd5b97a92674bf;hpb=0fa932853c76d8aca9fecf125d4c2d6816fb1a4a;p=friendica.git diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 436727a78f..0d703dfb31 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -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']; @@ -443,7 +448,7 @@ function dfrn_poll_content(&$a) { $encrypted_id = ''; $id_str = $my_id . '.' . mt_rand(1000,9999); - if($r[0]['duplex'] && strlen($r[0]['pubkey'])) { + if(($r[0]['duplex'] && strlen($r[0]['pubkey'])) || (! strlen($r[0]['prvkey']))) { openssl_public_encrypt($hash,$challenge,$r[0]['pubkey']); openssl_public_encrypt($id_str,$encrypted_id,$r[0]['pubkey']); } @@ -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'];