How to change the 'realname' after LDAP login
Categories
(Bugzilla :: Documentation, enhancement)
Tracking
()
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 :-)
Comment 1•2 years ago
|
||
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[...]".
Comment 2•2 years ago
|
||
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.
Description
•