from rt branch perl-5.18-compat, http://www.gossamer-threads.com/lists/rt/commit...
[freeside.git] / rt / lib / RT / Config.pm
index 2344193..b97802f 100644 (file)
@@ -1024,7 +1024,6 @@ sub Get {
 
     my $res;
     if ( $user && $user->id && $META{$name}->{'Overridable'} ) {
-        $user = $user->UserObj if $user->isa('RT::CurrentUser');
         my $prefs = $user->Preferences($RT::System);
         $res = $prefs->{$name} if $prefs;
     }
@@ -1234,6 +1233,7 @@ sub SetFromConfig {
             $ref_type = 'SCALAR' if $ref_type eq 'REF';
 
             my $entry_ref = *{$entry}{ $ref_type };
+            next if ref $entry_ref && ref $entry_ref ne ref $ref;
             next unless $entry_ref;
 
             # if references are equal then we've found