We are running Moodle v.2.3.6 on Windows Server 2008, and have had LDAP authentication working fine for a while now. Up until now, no automatic user creation/deletion has been done however, users have only been created in Moodle the first time they log in to Moodle.
Now we're trying to automate the user creation and deletion process when users are added/removed from AD, by running the sync_users.php script from the cmd line.
Everything seems to be set up correctly, when I run the command no errors are returned, and users are created and deleted where appropriate, but I've noticed that some user accounts in Moodle are deleted who still have a live account in AD.
Any ideas why this might be happening?