Some customers have the problem that the NameUserPrincipal we query over GetUserNameEx does not match the real email address of the user. The display name does not always give the desired result for the name, either.
dirmngr can be used to query AD.
We want to allow to configure the name and email in the "New OpenPGP Keypair" dialog via the Kleopatra registry settings EMAIL and NAME using data read from AD, environment variables, registry or local settings.
This could look kind of like this:
NAME={{AD.FirstName}} {{AD.Initials}} {{AD.LastName}}
NAME={{ENV.USER_NAME}}
NAME={{REG.LASTNAME}}, {{REG.FIRSTNAME}} ({{REG.DEPARTMENT}})
NAME={{LOCAL.DISPLAY_NAME}}
Additionally we might want to change the values used for NAME_prefill and EMAIL_prefill.