AdminUser-fullname-list-3.6.1

From Request Tracker Wiki
Jump to navigation Jump to search

Here is a patch we use to display the RealName if possible of users when selecting a user to edit on the rt/Admin/Users/index.html page. It has been tested on 3.6.1 but should work on 3.6.4.

This patch is useful for organizations with a large number of users or users who come and go. If a user does not have a RealName, the Name will be used instead.

--- index.html.ORIG     2007-08-16 15:33:10.000000000 -0500
+++ index.html  2007-08-16 15:32:06.000000000 -0500
@@ -57,7 +57,7 @@
 %my @ids;
 %while ( $user = $users->Next) {
 %    push @ids, $user->Id;
-<li><a href="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></li>
+<li><a href="Modify.html?id=<%$user->id%>"><%($user->RealName)?$user->RealName:$user->Name() || loc('(no name listed)')%></a></li>
%}
 </ul>
 %if (my $ids = join(',', @ids)) {