View Issue Details

IDProjectCategoryView StatusLast Update
0036873mantisbtldappublic2026-02-10 07:47
Reporterraspopov Assigned Tocommunity  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2.28.0 
Target Version2.29.0 
Summary0036873: When creating or updating a user, the email address and real name are not synchronized with LDAP
Description

There are two cases:

  1. When a user is created, the database is not initially populated with their email address and real name from LDAP.

  2. When updating a user who is not present in LDAP, their email and real name are cleared.

Steps To Reproduce

The use_ldap_realname and use_ldap_email options must be set to ON.

Additional Information

The problem is probably caused by the fact that the ldap_email_from_username() function and other similar functions do not return null or another error indicator if the user is not found in LDAP. The design of internal function calls suggests that this was most likely intended.

TagsNo tags attached.

Relationships

related to 0024044 assignedcommunity Getting user name and email from LDAP without LDAP authentication 

Activities

raspopov

raspopov

2026-02-09 11:28

reporter   ~0070781

Last edited: 2026-02-09 11:31

If LDAP is used, the UserUpdateCommand is invoked at the end with empty strings for email and real name rather than null values. These empty strings are interpreted as new values, which empties the database fields.

As far as I understand, MantisBT contains code that works directly with the database, bypassing the User API. Perhaps the same code is used in plugins, so it is better to have the most recent versions of the email address and real user name in the database.

PR: https://github.com/mantisbt/mantisbt/pull/2184

Better after 0024044.