LDAP dn+email change resulting in duplicate accounts, need way to merge (prevent if possible)
We've had an issue lately where a given user's AD/LDAP entry has been changed by IT (new OU and new email). This unfortunately is resulting in a duplicate account being created (with '1' appended) and much confusion about mismatched permissions/etc.
There may not be anything that can be done about that problem if gitlab is using the email/dn as the matching criteria. If so, the second part of this comes more info play: Is there some way using the rails console or other script to combine the two accounts?
Simplest would be to delete the new account, update the email on the old, and remove the ldap identity from the old, then have them log back in -- but that's not suitable if they have added comments/etc. using both the new AND old accounts. If there would be a suitable way to merge the two accounts after detecting this situation, that would help.