summaryrefslogtreecommitdiff
path: root/httemplate/pref/pref-process.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/pref/pref-process.html')
-rw-r--r--httemplate/pref/pref-process.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index 6f3518561..4ff878fd7 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -73,4 +73,14 @@ unless ( $error ) { # if ($access_user) {
}
+if ( !$error and ($FS::TicketSystem::system || '') eq 'RT_Internal' ) {
+ # sync RT user locale on every update
+ my $locale = $access_user->option('locale');
+ FS::TicketSystem->init;
+ my $UserObj = FS::TicketSystem->session('')->{'CurrentUser'}->UserObj;
+ # Bypass RT ModifySelf ACL
+ $UserObj->CurrentUser( RT::SystemUser );
+ my ($val, $msg) = $UserObj->SetLang($locale);
+ $error = $msg if !$val;
+}
</%init>