Till Brehm
2016-07-20 6c9798e50379cb35d75a941073070662a603c3ea
Fixed: Issue #4007 Language in mail user interface is not the language of the client.
1 files modified
9 ■■■■ changed files
interface/web/login/index.php 9 ●●●● patch | view | raw | blame | history
interface/web/login/index.php
@@ -159,6 +159,9 @@
                        $saved_password = stripslashes($mailuser['password']);
                        //* Check if mailuser password is correct
                        if(crypt(stripslashes($password), $saved_password) == $saved_password) {
                            //* Get the sys_user language of the client of the mailuser
                            $sys_user_lang = $app->db->queryOneRecord("SELECT language FROM sys_user WHERE default_group = ?", $mailuser['sys_groupid'] );
                            //* we build a fake user here which has access to the mailuser module only and userid 0
                            $user = array();
                            $user['userid'] = 0;
@@ -168,7 +171,11 @@
                            $user['typ'] = 'user';
                            $user['email'] = $mailuser['email'];
                            $user['username'] = $username;
                            $user['language'] = $conf['language'];
                            if(is_array($sys_user_lang) && $sys_user_lang['language'] != '') {
                                $user['language'] = $sys_user_lang['language'];
                            } else {
                                $user['language'] = $conf['language'];
                            }
                            $user['theme'] = $conf['theme'];
                            $user['app_theme'] = $conf['theme'];
                            $user['mailuser_id'] = $mailuser['mailuser_id'];