-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.6.1
-
None
-
MOODLE_26_STABLE
Problematic because when the moodle exception is thrown, all synchronization is abandoned and no records are synchronized. So 1 error causes script to abandon all synchronization (8,000 valid user accounts) when running auth\ldap\cli\sync_users.php.
username triggering error was: "test associate"
Appears the space character in the username triggered the exception.
Not an issue with Moodle version 2.5
Discussion of this problem was located in the following forum posts: https://moodle.org/mod/forum/discuss.php?d=244011
Gives the following results in 2.6.1+
-------------------------------------------
!!! The given username contains invalid characters !!!
!!
Error code: invalidusername !!
!! Stack trace: * line 48 of \user\lib.php: moodle_exception thrown
- line 948 of \auth\ldap\auth.php: call to user_create_user()
- line 63 of \auth\ldap\cli\sync_users.php: call to auth_plugin_ldap->sync_users()
!!
-------------------------------------------
Temporary Workaround - comment out line 48 of user/lib.php as suggested in the forum.
//throw new moodle_exception('invalidusername');
This bypasses the checking, but puts us at risk of trying to create users with truly invalid usernames.
Thanks
- duplicates
-
MDL-42993 Username with spaces no longer valid for LDAP authenticated users
-
- Closed
-