Quantcast
Channel: Authentication
Viewing all articles
Browse latest Browse all 8256

Re: LDAP users sync job doesn't work

$
0
0

by Iñaki Arenaza.  

Unfortunately, current code doesn't show the problematic user name (in fact, doesn't show any user detail at all). The last name you get in the execution output is the last known good user, not the problematic one. If you want to get the details of the "faulty user", you need to modify the code a bit. 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();
            }

That should display all the user details, plus the exception details (so you know why Moodle didn't like it), and then stops processing the rest of the users so you can try and fix the problematic user..

Saludos. Iñaki.


Viewing all articles
Browse latest Browse all 8256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>