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

sync_users does not trigger event core\event\user_updated

    XMLWordPrintable

    Details

    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      wip-mdl-49022

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  6/Jul/15