Moodle 2.2.3 sync_users.php updates existing accounts but doesn't add new users

Moodle 2.2.3 sync_users.php updates existing accounts but doesn't add new users

by Michael O'Brien -
Number of replies: 4

When running sync_users.php from CLI in auth/ldap/cli its stops with !!! Error writing to database !!! and doesn't add any new users.

The last few lines displayed follow the format

Updating user name.surname id 1223

User entried to be added: 544

Inserting user namex.surnamey id 26865

Inserting user namexx.surnameyy id 26867

.

.

.

Inserting user namez.surnamex id 26894

!!! Error writing to database !!!

Can I manually add the ldap users I need to get around this problem as a short fix?

How do I find out why its failing adding the user 26895 (or is it even failing then)

 

Extra Info:

The script stops at the same place each time but I can't tell why or how to manually force the updates through. Is there a way to preserve the temp table, make any edits that might be needed and force the update through?

Average of ratings: -
In reply to Michael O'Brien

Re: Moodle 2.2.3 sync_users.php updates existing accounts but doesn't add new users

by Michael O'Brien -

update: Manually adding a new user using the values that would be pulled from Active Directory and setting their authentication to ldap does allow me to workaround the issue and have the user account authenticate via ldap but not practical for the 543 other accounts that are not getting added.

In reply to Michael O'Brien

Re: Moodle 2.2.3 sync_users.php updates existing accounts but doesn't add new users

by David Hallam -

i have just noticed this on my install as well today when i noticed i didnt have enough users. on the latest weekley version 2.2.3+ strange as same message and it has always worked before.

 

In reply to David Hallam

Re: Moodle 2.2.3 sync_users.php updates existing accounts but doesn't add new users

by David Hallam -

did turn debugging on and got the following:

 

Notice: Undifined property: stdClass::$Username in C:\moodle\vle\auth\ldap\auth.php on line 848