- Create a user account in Active Directory or other LDAP source registry. Ensure that the username is "$newusername" sign.
- Login to Moodle as a Site Administrator
- Navigate to Site Administration > Security > Site Security Settings
- Ensure that Allow extended characters in usernames is disabled. Save if you made a change.
- Navigate to Site Administration > Server > Scheduled Tasks.
- Locate the line for LDAP user sync job
- Click the "Run Now" link.
- Click the "Run Now" button.
If you don't see the "Run Now" link in step 6, you will need to:
- Navigate to Site Administration > Server > System Paths
- Fill in the Path to PHP CLI and save*.*
What you should see:
1. When the page finishes loading, scroll through the list of added users. You should now see a message that tells you the information for the user that could not be synchronized. It will look something like this:
Error: Cannot create new user account. Details and the reason:
stdClass Object
(
[modified]] => 1618919858
[confirmed] => 1
[auth] => ldap
[mnethostid] => 1
[username] => $newusername
[lang] => en
[calendartype] => gregorian
)
Skipping this user.
There should also be a reason listed. The message will vary depending on the reason that the sychronization failed. If you have one or more other accounts that could not be syncronized, you will see additional similar messages which will be the same as Moodle currently displays.
The difference is that you can now see the which account caused the issue and Moodle will complete the rest of the synchronization process for the rest of the users - neither of which it currently does.
2. Scroll down to the very bottom of the page. A new additional message will appear a few lines before the end indicating the number of failed account creations. The number may vary depending on the number of issues but the message should look like this:
Warning: Skipped creation of 2 user accounts.
This was done so that Moodle Administrators could go directly to the bottom to find out if there were any issues instead of having to look through potentially thousands of user accounts in the list (I have over 28,000 in my list).
If you made it this far, the change is working correctly.