aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/user.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index f64c28a46..6e5e0c8ed 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -25,8 +25,17 @@
// | USA. |
// +-----------------------------------------------------------------------+
-// retrieving connected user informations
+// Dynamic change of language with database persistency
+if (isset($_POST['language']))
+{
+ $query = "UPDATE ".USERS_TABLE." SET language = '";
+ $query.= $_POST['language'];
+ $query.= "' WHERE id = ".$_POST['userid'].";";
+ pwg_query($query);
+}
+
+// retrieving connected user informations
if (isset($_COOKIE['id']))
{
$session_id = $_COOKIE['id'];