I am running a board for a university student union division, and a business requirement was to link it to the LDAP server to restrict access to current staff and students.
Now, I have the LDAP connection and account creation working fine. The issue is that the student IDs are quite unwieldy and it was flagged that they would prefer to have the Display name (i.e., _users.username) in the form 'John Citizen (jjcit1)' where it is 'Firstname Lastname (User ID)'. At the same time, they want to maintain using the ID to login - which appears to be in _users.username_clean from my mucking around in MySQL console.
The question is, how should I pull this extra data from LDAP, and how to I populate this field on account creation (i.e., first log-in) whilst maintaining the user ID as username_clean? I do not need to retroactively do this for accounts already in the _users table, as there are none.
From my research, I need to hack these files:
But I've never touched PHP in my life (I do have a programming background in Java, however).