projects
/
manu
/
RT-Extension-UserDetails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix crash when there is no UserDetailsAttributes setting
[manu/RT-Extension-UserDetails.git]
/
html
/
Elements
/
ShowUserDetails
diff --git
a/html/Elements/ShowUserDetails
b/html/Elements/ShowUserDetails
index
0e756bd
..
de5cbfe
100644
(file)
--- a/
html/Elements/ShowUserDetails
+++ b/
html/Elements/ShowUserDetails
@@
-22,8
+22,11
@@
my $url = RT->Config->Get('WebPath') ."/Helpers/Toggle/UserDetails?id=". $id;
# Default Attributes to display
# SortOrder => { AttributeName => '',
# DisplayName => '', }
# Default Attributes to display
# SortOrder => { AttributeName => '',
# DisplayName => '', }
-unless ( RT->Config->Get('UserDetailsAttributes') ) {
- RT->Config->Set('UserDetailsAttributes',
+my %attributes;
+if ( RT->Config->Get('UserDetailsAttributes') ) {
+ %attributes = RT->Config->Get('UserDetailsAttributes');
+} else {
+ %attributes = (
1 => { AttributeName => 'RealName',
DisplayName => 'Real Name',
},
1 => { AttributeName => 'RealName',
DisplayName => 'Real Name',
},
@@
-32,14
+35,10
@@
unless ( RT->Config->Get('UserDetailsAttributes') ) {
},
3 => { AttributeName => 'Organization',
DisplayName => 'Organization',
},
3 => { AttributeName => 'Organization',
DisplayName => 'Organization',
- },
+ },
);
}
);
}
-my %attributes = RT->Config->Get('UserDetailsAttributes');
-
-
-
my $User;
# Load User only if needed
my $User;
# Load User only if needed