Skip to content

Commit 6c9798e

Browse files
author
Till Brehm
committed
Fixed: Issue #4007 Language in mail user interface is not the language of the client.
1 parent 8a1f4cf commit 6c9798e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

interface/web/login/index.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@
159159
$saved_password = stripslashes($mailuser['password']);
160160
//* Check if mailuser password is correct
161161
if(crypt(stripslashes($password), $saved_password) == $saved_password) {
162+
//* Get the sys_user language of the client of the mailuser
163+
$sys_user_lang = $app->db->queryOneRecord("SELECT language FROM sys_user WHERE default_group = ?", $mailuser['sys_groupid'] );
164+
162165
//* we build a fake user here which has access to the mailuser module only and userid 0
163166
$user = array();
164167
$user['userid'] = 0;
@@ -168,7 +171,11 @@
168171
$user['typ'] = 'user';
169172
$user['email'] = $mailuser['email'];
170173
$user['username'] = $username;
171-
$user['language'] = $conf['language'];
174+
if(is_array($sys_user_lang) && $sys_user_lang['language'] != '') {
175+
$user['language'] = $sys_user_lang['language'];
176+
} else {
177+
$user['language'] = $conf['language'];
178+
}
172179
$user['theme'] = $conf['theme'];
173180
$user['app_theme'] = $conf['theme'];
174181
$user['mailuser_id'] = $mailuser['mailuser_id'];

0 commit comments

Comments
 (0)