From a5e0190f23a9b3ee840e98f9a819d688f6326781 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 9 May 2011 22:15:19 -0700 Subject: [PATCH] missing self photo on remote site comment boxes --- include/auth.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/auth.php b/include/auth.php index 4c7e85d867..ec02cd85c0 100644 --- a/include/auth.php +++ b/include/auth.php @@ -28,6 +28,15 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p goaway($a->get_baseurl()); } + if(x($_SESSION['visitor_id']) && (! x($_SESSION['uid']))) { + $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", + intval($_SESSION['visitor_id']) + ); + if(count($r)) { + $a->contact = $r[0]; + } + } + if(x($_SESSION,'uid')) { // already logged in user returning