Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#170 Display Name

open
nobody
None
5
2012-07-20
2011-06-16
Anonymous
No

Hi,

A possible feature would be to be able to set MRBS to use a display name instead of a user name.

Here's some preliminary code I've written which might be an approach:

config.inc.php (defaults in systemdefaults.inc)
//Displays a "full name" instead of a user name (e.g. "John Smith", instead of "jsmith"
//This setting would normally be set to false and requires the authentication method
//to provide the function "getFullName."
$get_user_full_name = TRUE;
$ldap_fullname_attrib = 'display_name'; //maybe for ldap, only? (following mail convention)

functions_view.inc line 71
case 'create_by':
//$user=getUserName(); //old code
global $get_user_full_name;
if (isset($get_user_full_name) && $get_user_full_name && function_exists("getFullName"))
{
$data[$key]=getFullName(getUserName()); //display the full name
} else {
$data[$key]=getUserName();
}

session_$auth[session].inc files PrintLogonBox()
global $get_user_full_name;
if (isset($get_user_full_name) && $get_user_full_name && function_exists("getFullName"))
{
$user=getFullName(getUserName());
} else {
$user=getUserName();
}

Thanks,

-Shane

Discussion


  • Anonymous
    2011-06-16

    Actually, I made some mistakes on the functions_view.inc. Forget what I previously post for that file. It would be better to include the following code (or some kind of equivalent) on line 148:
    global $get_user_full_name;
    if (isset($get_user_full_name) && $get_user_full_name && function_exists("getFullName"))
    {
    $data['create_by']=getFullName(getUserName($data['create_by'])); //display the full name
    } else {
    $data['create_by']=getUserName($data['create_by']);
    }

     

  • Anonymous
    2011-06-16

    ...hmmm and the else section isn't needed. I'm trigger happy today! :P

    -S

     


Anonymous


Cancel   Add attachments