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

Replace Legacy events - User

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Run phpunit
        • enrol/meta/tests/plugin_test.php
        • enrol/manual/tests/lib_test.php
        • lib/tests/moodlelib_test.php
        • user/tests/userlib_test.php
        • badges/tests/badgeslib_test.php
      2. Do all 4 operations CRUD for user.
      3. Do all 4 operations CRUD for enrolling user in course
      4. Try meta enrolment
      5. Try LDAP enrolment
      Show
      Run phpunit enrol/meta/tests/plugin_test.php enrol/manual/tests/lib_test.php lib/tests/moodlelib_test.php user/tests/userlib_test.php badges/tests/badgeslib_test.php Do all 4 operations CRUD for user. Do all 4 operations CRUD for enrolling user in course Try meta enrolment Try LDAP enrolment
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      wip-mdl-39961
    • Story Points:
      40
    • Sprint:
      BACKEND Sprint 4

      Description

      Replace all legacy events related to User.
      admin/tool/uploaduser/index.php: events_trigger('user_updated', $existinguser);
      admin/tool/uploaduser/index.php: events_trigger('user_created', $user);
      admin/user.php: events_trigger('user_updated', $user);
      admin/user.php: events_trigger('user_updated', $user);
      auth/email/auth.php: events_trigger('user_created', $user);
      auth/ldap/auth.php: events_trigger('user_created', $user);
      lib/enrollib.php: events_trigger('user_enrolled', $ue);
      lib/enrollib.php: events_trigger('user_enrol_modified', $ue);
      lib/enrollib.php: events_trigger('user_enrol_modified', $ue);
      lib/enrollib.php: events_trigger('user_unenrolled', $ue);
      lib/enrollib.php: events_trigger('user_unenrolled', $ue);
      lib/eventslib.php:function events_trigger($eventname, $eventdata) {
      lib/moodlelib.php: events_trigger('user_logout', $params);
      lib/moodlelib.php: events_trigger('user_created', $DB->get_record('user', array('id'=>$user->id)));
      lib/moodlelib.php: events_trigger('user_updated', $DB->get_record('user', array('id'=>$oldinfo->id)));
      lib/moodlelib.php: events_trigger('user_deleted', $user);
      enrol/manual/locallib.php: events_trigger('user_enrol_modified', $enrolment);
      user/edit.php: events_trigger('user_updated', $usernew);
      user/editadvanced.php: events_trigger('user_created', $usernew);
      user/editadvanced.php: events_trigger('user_updated', $usernew);
      user/emailupdate.php: events_trigger('user_updated', $user);
      user/lib.php: events_trigger('user_created', $newuser);
      user/lib.php: events_trigger('user_updated', $updateduser);

      Please also check user/lib.php user_update_users() from MDL-34422 (if it has been integrated)
      events_trigger('user_updated', $user);

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13