调试:重复输入' 1-010' for key' mdl_tmpextu_mneuse_uix'在Moodle

时间:2014-03-13 08:39:49

标签: debugging authentication ldap moodle

我正在运行/auth/ldap/cli/sync_users.php cron脚本,我收到了这个错误:调试:重复输入' 1-010'对于密钥' mdl_tmpextu_mneuse_uix' 。可能是什么原因?

有关错误的更多信息:

INSERT INTO mdl_tmp_extuser (username,mnethostid) VALUES(?,?)
[array (
  0 => '010',
  1 => '1',
)]
Error code: dmlwriteexception
* line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1043 of /auth/ldap/auth.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 738 of /auth/ldap/auth.php: call to auth_plugin_ldap->ldap_bulk_insert()
* line 63 of /auth/ldap/cli/sync_users.php: call to auth_plugin_ldap->sync_users()

1 个答案:

答案 0 :(得分:1)

看起来LDAP系统返回的用户名不止一个。

导致错误的代码是从LDAP系统中提取所有用户名并将其插入临时表的代码,然后将此列表与已在Moodle站点注册的现有用户进行比较。

我建议您检查LDAP系统,看看是否有多个用户使用' 010'的用户名(根据错误消息)。