Skip to content

Resolve "LDAP generated user, last name infix are not set"

Added logic to determine the infix from the display name.

A possible infix is extracted from the display name by searching for the first and the last name in the display name and taking everything between them as the infix. Everything after the last name is ignored as some employees have suffixes such as " - EWI" as part of their display name. Afterwards, the infix is prepended to the last name (as provided by LDAP) before creating the user.

If there is no infix or this parsing logic fails for some reason (e.g. the given name or the surname from LDAP don't appear in the display name), the last name of the newly-created user will be set to the value LDAP provides as a surname and no infix will be prepended.

If the name is incorrectly determined by this logic, it will be overwritten to the correct name as soon as the user logs in for the first time.

Closes #359 (closed)

Edited by Martin Mladenov

Merge request reports