File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 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 ;
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 ' ];
You can’t perform that action at this time.
0 commit comments