5 my $users = RT::Users->new(RT->SystemUser);
8 my $attributes = $users->Join(
11 TABLE2 => RT::Attributes->Table,
16 FIELD => "ObjectType",
22 VALUE => RT::User::_PrefName( RT->System ),
25 # Iterate all users (including disabled), with config preferences set.
26 # Avoids running a query for every user in the system by only selecting
27 # those known to have preferences.
28 while (my $user = $users->Next) {
29 RT->Logger->debug(sprintf "User #%d has config preferences", $user->id);
31 my $config = $user->Preferences( RT->System )
33 next unless exists $config->{DeferTransactionLoading};
35 $config->{ShowHistory} = delete $config->{DeferTransactionLoading}
38 $user->SetPreferences( RT->System, $config );
39 RT->Logger->debug(sprintf "Updated config Preferences for user %s (#%d)", $user->Name, $user->id);