aboutsummaryrefslogtreecommitdiffstats
path: root/mod/openid.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-23 17:18:36 -0700
committerFriendika <info@friendika.com>2011-05-23 17:18:36 -0700
commit3e6180183bdc01edfa01dc4b966daa4081c29604 (patch)
tree57cc791da7766c07f6c3dcb323ba8539cef9cd23 /mod/openid.php
parent3ea145fae7defaf959b04797afc8482bd0190352 (diff)
downloadvolse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.tar.gz
volse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.tar.bz2
volse-hubzilla-3e6180183bdc01edfa01dc4b966daa4081c29604.zip
improved browser language detect, set user language on login
Diffstat (limited to 'mod/openid.php')
-rw-r--r--mod/openid.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/openid.php b/mod/openid.php
index c3c6c11e9..7bf8c299c 100644
--- a/mod/openid.php
+++ b/mod/openid.php
@@ -103,11 +103,15 @@ function openid_content(&$a) {
$_SESSION['cid'] = $a->cid;
}
- q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
+ $l = get_language();
+
+ q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1",
dbesc(datetime_convert()),
+ dbesc($l),
intval($_SESSION['uid'])
);
+
header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
if(($a->module !== 'home') && isset($_SESSION['return_url']))
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);