From 377f991ac5b1e8c3c679fbbc5e138256bc24715b Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 1 Mar 2011 20:18:47 -0800 Subject: switch identities to manage pages --- mod/openid.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'mod/openid.php') diff --git a/mod/openid.php b/mod/openid.php index 2e1025692..6ccd28e5b 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -78,8 +78,16 @@ function openid_content(&$a) { $a->timezone = $a->user['timezone']; } - $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1", - intval($_SESSION['uid'])); + $r = q("SELECT `uid`,`username` FROM `user` WHERE `password` = '%s' AND `email` = '%s'", + dbesc($a->user['password']), + dbesc($a->user['email']) + ); + if(count($r)) + $a->identities = $r; + + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", + intval($_SESSION['uid']) + ); if(count($r)) { $a->contact = $r[0]; $a->cid = $r[0]['id']; -- cgit v1.2.3