-
Improvement
-
Resolution: Fixed
-
Minor
-
3.3, 3.5.3, 3.5.18, 3.8.8, 3.8.9, 3.9.6, 3.9.7, 3.10.4, 3.11, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_33_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-58395-master -
If you have a problematic username it's impossible to tell which one and change it so LDAP can sync
Possible solution suggested by Iñaki https://moodle.org/mod/forum/discuss.php?d=349037#p1408848
Look for a line like this in auth/ldap/auth.php, around line 950 (in Moodle 3.2.1):
$id = user_create_user($user, false);
|
Then change it to look like this:
try {
|
$id = user_create_user($user, false);
|
} catch (Exception $e) {
|
echo "!!!! Could not add user. Exception details: ".print_r($e, true);
|
echo "\n!!!! Stopping so you can fix the problematic user...\n\n\n";
|
die();
|
}
|
This could be adapted as needed into a full solution
- has been marked as being related by
-
MDL-72434 Clean \n in auth_ldap language strings
-
- Open
-