From c16f314ec348205f4741e0171335168720e652d2 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 25 Oct 2010 21:52:30 -0700 Subject: two-way subscriptions working with federated social accounts --- include/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/auth.php') diff --git a/include/auth.php b/include/auth.php index 7e04cb2e7..a54b24f08 100644 --- a/include/auth.php +++ b/include/auth.php @@ -41,7 +41,7 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] === 'login'))) { $_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $a->user['nickname']; - $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", intval($_SESSION['uid'])); if(count($r)) { $a->contact = $r[0]; @@ -91,6 +91,7 @@ else { $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1", intval($_SESSION['uid'])); if(count($r)) { + $a->contact = $r[0]; $a->cid = $r[0]['id']; $_SESSION['cid'] = $a->cid; } -- cgit v1.2.3