X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fpref%2Fpref-process.html;h=974b96dc2cc4aedb0746436c3c8d213637d896db;hb=1cc2f252d504829e7aa4394a4c788e6e6fc03756;hp=6f35185613648c3848be72a0d23d0582b984c87b;hpb=f1cfd3ba31c346283520ea88ad3b8b265559db02;p=freeside.git diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html index 6f3518561..974b96dc2 100644 --- a/httemplate/pref/pref-process.html +++ b/httemplate/pref/pref-process.html @@ -73,4 +73,16 @@ 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 ); + if ( $UserObj->Lang ne $locale ) { + my ($val, $msg) = $UserObj->SetLang($locale); + $error = $msg if !$val; + } +}