]> git.mxchange.org Git - friendica.git/blobdiff - include/auth.php
Merge branch 'fabrixxm-master'
[friendica.git] / include / auth.php
index 1c430406e9e84328f8d69bac078d0302aa3dafde..fd80a63e221a553e6b484ec19c84e99e61297af3 100644 (file)
@@ -24,7 +24,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
                // process logout request
 
                nuke_session();
-               notice( t('Logged out.') . EOL);
+               info( t('Logged out.') . EOL);
                goaway($a->get_baseurl());
        }
 
@@ -205,11 +205,11 @@ else {
                if($a->user['login_date'] === '0000-00-00 00:00:00') {
                        $_SESSION['return_url'] = 'profile_photo/new';
                        $a->module = 'profile_photo';
-                       notice( t("Welcome ") . $a->user['username'] . EOL);
-                       notice( t('Please upload a profile photo.') . EOL);
+                       info( t("Welcome ") . $a->user['username'] . EOL);
+                       info( t('Please upload a profile photo.') . EOL);
                }
                else
-                       notice( t("Welcome back ") . $a->user['username'] . EOL);
+                       info( t("Welcome back ") . $a->user['username'] . EOL);
 
                if(strlen($a->user['timezone'])) {
                        date_default_timezone_set($a->user['timezone']);
@@ -232,9 +232,11 @@ else {
                        $_SESSION['cid'] = $a->cid;
                }
 
+               $l = get_language();
 
-               q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
+               q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1",
                        dbesc(datetime_convert()),
+                       dbesc($l),
                        intval($_SESSION['uid'])
                );