X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fopenid.php;h=6ccd28e5b62831ef30a81991b8ba8f99b4297114;hb=8c245a5d2f4e6882211ac17561f86537a7089c73;hp=91efbbbc421313e405e6eb2f3acdecf665f2e111;hpb=f60f82727f96c033aaff9f5b5f0767c722e25f28;p=friendica.git diff --git a/mod/openid.php b/mod/openid.php index 91efbbbc42..6ccd28e5b6 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -72,11 +72,22 @@ function openid_content(&$a) { notice( t("Welcome back ") . $r[0]['username'] . EOL); $a->user = $r[0]; - if(strlen($a->user['timezone'])) + + if(strlen($a->user['timezone'])) { date_default_timezone_set($a->user['timezone']); + $a->timezone = $a->user['timezone']; + } + + $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` = %s AND `self` = 1 LIMIT 1", - intval($_SESSION['uid'])); + $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'];