View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0029230||mantisbt||ldap||public||2021-10-27 18:01||2021-10-31 06:23|
|Target Version||2.26.0||Fixed in Version||2.26.0|
|Summary||0029230: Can't set a custom field for ldap email|
I have setted up LDAP authentication.
My organization has setted the LDAP email field to "mail1".
Is there a way to custom this field, like $g_ldap_realname_field or $g_ldap_uid_field ?
|Steps To Reproduce|
|Tags||No tags attached.|
Fixed changing line 262 of ldap_api.php
E-mail field cannot be customized at the moment, this would require a new config option.
Yes, that's one of them ldap_cache_user_data() , but you need also to change it in ldap_email_from_username() function (line 179).
I guess it makes sense to allow customizing this. I prepared a patch for it, see PR https://github.com/mantisbt/mantisbt/pull/1784
@sebastianOspina it would be nice if you could apply the patch on your instance, test it and let me know your feedback, either here or in the PR.
MantisBT: master cca76325
|Add new config $g_ldap_email_field
Allows customizing the LDAP field used to store the user's e-mail
address, when $g_use_ldap_email = ON.
|mod - config_defaults_inc.php||Diff File|
|mod - core/ldap_api.php||Diff File|
|mod - docbook/Admin_Guide/en-US/config/auth.xml||Diff File|