Problem with LDAP and Username change

Problem with LDAP and Username change

by lee kirkland -
Number of replies: 0

Okay, so we have an issue with LDAP(AD) and creating extra accounts when a user gets a name change. Take for instance, a lady who gets married or their first name is wrong in their username. Take for instance Doug getting changed to Douglas, but email is still Doug.doe@email.com. LDAP plugin will create a new account because the username has changed, but the accounts still have the same email.

 I understand there being an issue if we change the username and email in LDAP and that causes a new account creation. But if the email is the same, how is the account being created without an error being thrown? We can't unlock the fields because if the user changes their username or email themselves it may cause a new account to be created when the LDAP resyncs with Moodle. 

Is there a solution for this? right now the work around is to change the values that need to be changed before the LDAP is updated so the sync doesn't cause a new account to be created. One way I see avoiding this is to drop the sync. However, how much of a performance penalty do we take if we did that?  


EDIT: I have found the mergeusers_v4.php file in another part of the forum, I think that might solve a part of the problem. I just need to make sure all the courses get updates so if the user is taking a course they are not reset or 'lost'.

Average of ratings: -