View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003068 | mantisbt | bugtracker | public | 2003-03-19 16:16 | 2009-06-26 12:00 |
Reporter | idcmp | Assigned To | grangeway | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Summary | 0003068: 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. ] | ||||
Tags | No tags attached. | ||||
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? |
|
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"; 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) |
|
Just for the record, I don't need this anymore. ;-) |
|
Marking as resolved then Paul |
|