LDAP Course Enrollment not working perfectly

Re: LDAP Course Enrollment not working perfectly

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

A user can be enrolled with multiple roles but there would be just one row with each role listed in the Roles column. So these aren't two profiles for the same user, they're two different user accounts in Moodle.

So what I think has happened is:

  1. You've created a user account in Moodle with Authentication method set to LDAP server. This user is enrolled on the course.
  2. The user has logged in with a different username that is valid on the LDAP server consequently a second account is created in Moodle with this username. This second user is not enrolled on the course.

So you need to find out what the difference is between the two usernames, for example with the database query:

SELECT id, auth, username FROM mdl_user WHERE email = '<email>@mi-eq.com';

Change <email> to the email address for the affected user. You may find you need to change the User attribute field on Moodle's LDAP authentication page.