View Issue Details

IDProjectCategoryView StatusLast Update
0003068mantisbtbugtrackerpublic2009-06-26 12:00
Reporteridcmp Assigned Tograngeway  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
Summary0003068: render_full_name in core/print.php
Description

I'd like one central PHP function that could be used to 'render' the full name of a userid. In the default Mantis distribution it would just return back the userid, but in localized customizations it could do things like getpwnam, or an LDAP lookup.

Additional Information

In order to do this right now, the code that populates the drop downs, the email link, the email+subject link and a few other places need to be modified. On the particular system I'm on, we all have local shell accounts, so I can use the gecos from getpwnam. Others may be in similar situations; or want to render userids differently.

[ I'm willing to provide a simple patch if the idea is accepted. ]

TagsNo tags attached.

Relationships

child of 0004235 closedvboctor Support Generic Authentication through Plug-ins 

Activities

jfitzell

jfitzell

2003-03-19 22:06

reporter   ~0004014

Well there is user_get_name() which is supposed to be used everwhere to get the user name (because it allows for the fact that the user may have been deleted). Would changing that in your installation solve your problem?

Hmm... I guess there are places where we just select all the user names though and therefore know that the users exist. I'd hate to have to call a function to lookup the username for each one....

thoughts?

idcmp

idcmp

2003-03-20 17:28

reporter   ~0004018

user_get_name returns the username given a userid. render_full_name would return a humanly-understandable form of the username given the username. So:

user_get_name(9290) => "jsmith";
render_full_name("jsmith") => "John Smith";

Those dropdown lists tend to be small for most projects, so the performance impact would be minimal. Those with big projects could do more interesting things (cache lookups, etc)

idcmp

idcmp

2009-01-27 03:34

reporter   ~0020724

Just for the record, I don't need this anymore. ;-)

grangeway

grangeway

2009-05-30 20:35

reporter   ~0021988

Marking as resolved then

Paul