Closed Bug 1870609 Opened 2 years ago Closed 2 years ago

How to change the 'realname' after LDAP login

Categories

(Bugzilla :: Documentation, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1356897

People

(Reporter: me, Unassigned)

Details

Some users complain that the 'realname' of users who login into Bugzilla via ldap is overwritten or not configurable.
It is indeed overwritten in the file ../Auth/Verify/LDAP.pm

...
$params->{bz_username} = $username;
}

$params->{realname} ||= $user_entry->get_value("displayName");
$params->{realname} ||= $user_entry->get_value("cn");

$params->{extern_id} = $username;

return $params;
...

It is not true, that you can't configure that part. Unfortunately I couldn't find any Documentation about it.
This Documentation (https://bugzilla.readthedocs.io/en/5.2/administering/parameters.html#ldap) only tells me
(In this case, Bugzilla will attempt to use the “displayName” or “cn” attribute to determine the user’s full name.)
This is what I can see in the code above. Which we can happily change into whatever we need and use in our LDAP System.

You can change the realname into:
$params->{realname} ||= $user_entry->get_value("givenName").$user_entry->get_value("sn");

or use other fields depending on where your information is kept in LDAP.

Could someone add this information to the documentation? I think some people would like to read about it. I'm new here and don't know how to do it...

Thanks and have a great day :-)

The information that you can change Bugzilla's code to do whatever you want is covered in the beginning of the documentation (https://bugzilla.readthedocs.io/en/5.2/about/index.html#license).

"Bugzilla is free and open source software[...]".

I agree with Emmanuel. I don't think that the documentation should contain a list of "edit lines X in file Y to do Z.". A better solution is to implement what has been discussed in bug 1356897 already. It's not a hard job.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1356897
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.