-
Bug
-
Resolution: Fixed
-
Critical
-
2.0, 2.1, 2.2
-
None
-
LAMP and MS Active Directory
-
MySQL
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
wip_
MDL-24666_HEAD_sync_users.php -
Easy
-
The "sync_users.php" script updates users fine, but it doesn't add new users via LDAP from AD.
Here's the scripts error message (i only changed Name and E-Mail):
----------
Database transaction aborted automatically in /var/www/moodle/web/auth/ldap/cli/sync_users.php
Default exception handler: Error writing to database Debug: Duplicate entry '1-' for key 'user_mneuse_uix'
INSERT INTO user (firstname,lastname,email,idnumber,department,confirmed,auth,mnethostid,username,lang) VALUES(?,?,?,?,?,?,?,?,?,?)
[array (
0 => 'Nils',
1 => 'Holgerson',
2 => 'Nils.Holgerson@uni-wh.de',
3 => '54129',
4 => '2010/10/13',
5 => 1,
6 => 'ldap',
7 => '1',
8 => '',
9 => 'en',
)]
- line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 816 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 858 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
- line 852 of /auth/ldap/auth.php: call to mysqli_native_moodle_database->insert_record()
- line 65 of /auth/ldap/cli/sync_users.php: call to auth_plugin_ldap->sync_users()
Potential coding error - existing temptables found when disposing database. Must be dropped!
----------
As you can see the field "8" (username) is empty which probably leads to this error. It is mapped against sAMAccountName in AD. This mapping is working in updating users but not in creating new in the Moolde DB.
Thanks for your help in advance!
- has been marked as being related by
-
MDL-29358 Error writing to database Debug: Duplicate entry for key 'user_mneuse_uix'
-
- Closed
-