Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49022

sync_users does not trigger event core\event\user_updated

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • wip-mdl-49022
    • Hide
      1. Define LDAP setting for unit test

        define('TEST_AUTH_LDAP_HOST_URL', 'ldap://172.20.255.133');
        define('TEST_AUTH_LDAP_BIND_DN', 'cn=admin,dc=my-domain,dc=com');
        define('TEST_AUTH_LDAP_BIND_PW', 'secret');
        define('TEST_AUTH_LDAP_DOMAIN', 'dc=my-domain,dc=com');
        

      2. run vendor/bin/phpunit auth/ldap/tests/plugin_test.php
      Show
      Define LDAP setting for unit test define('TEST_AUTH_LDAP_HOST_URL', 'ldap://172.20.255.133'); define('TEST_AUTH_LDAP_BIND_DN', 'cn=admin,dc=my-domain,dc=com'); define('TEST_AUTH_LDAP_BIND_PW', 'secret'); define('TEST_AUTH_LDAP_DOMAIN', 'dc=my-domain,dc=com'); run vendor/bin/phpunit auth/ldap/tests/plugin_test.php

      Problem:
      When the auth/ldap/cli/sync_users.php script is triggered from cli it runs through ldap users and ensures their details are up to date with data on the Domain Controller. As a result many user's profiles may be updated, but the event core\event\user_updated is not triggered.

      Cause:
      Line 1033 of auth/ldap/auth.php the call to user_update_user() is explicitly preventing the event core\event\user_updated from being triggered.

            markdw Mark Ward
            markdw Mark Ward
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.