Username Change with External Database Authentication

Re: Username Change with External Database Authentication

by David Aylmer -
Number of replies: 0

If you open up the file: /auth/db/auth.php and look at the comments to the function sync_users you'll notice this: 

 * Sync should be done by using idnumber attribute, not username.

And that comment has been there for over 5 years smile

You'll want to:
- Change the call to get_userlist() to retrieve a list of idnumbers rather than usernames
- Change the obsolete users check to look at idnumbers rather than usernames
- If you remove users, to do it based on idnumbers rather than usernames
- When updating... to updated based on idnumbers rather than usernames

etc etc...

You might also want to change config.html because you're not interested in 'fielduser' but interested in the external database key field (idnumber) - which shouldn't ever be the username if the username is mutable in your external database (as it probably is in nearly every case).

Or you could wait until it gets fixed (it probably won't get fixed)