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

/user/editadvanced.php doesn't trigger user_created or user_updated event

    XMLWordPrintable

Details

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • Hide

      Test 1:

      1. Run phpunit user/tests/userlib_test.php
      2. Run phpunit lib/tests/moodlelib_test.php

      Test 2:

      1. As Admin User
      2. Navigate to: Site administration ►Users ► Accounts ►Add a new user (/user/editadvanced.php)
      3. Fill in form (required fields) and click Create user (or Save changes)
      4. Verifiy user_created event is added to report->logs
      5. Edit an existing user
      6. Verify user_updated event is added to report->logs
      Show
      Test 1: Run phpunit user/tests/userlib_test.php Run phpunit lib/tests/moodlelib_test.php Test 2: As Admin User Navigate to: Site administration ►Users ► Accounts ►Add a new user (/user/editadvanced.php) Fill in form (required fields) and click Create user (or Save changes ) Verifiy user_created event is added to report->logs Edit an existing user Verify user_updated event is added to report->logs

    Description

      user_created and user_updated events not triggered at all in user/editadvanced.php
      Think this was an oversight in MDL-45641

      • see following in 2.7.1 /user/editadvanced.php (missing from 2.6.4)

         255     // Trigger update/create event, after all fields are stored.
         256     if ($usercreated) {
         257         \core\event\user_created::create_from_userid($usernew->id)->trigger();
         258     } else {
         259         \core\event\user_updated::create_from_userid($usernew->id)->trigger();
         260     }
        

      Attachments

        Issue Links

          Activity

            People

              rajeshtaneja Rajesh Taneja
              brentboghosian Brent Boghosian
              Jason Fowler Jason Fowler
              Sam Hemelryk Sam Hemelryk
              Simey Lameze Simey Lameze
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Sep/14