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

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

    XMLWordPrintable

    Details

    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE

      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

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              brentboghosian Brent Boghosian
              Peer reviewer:
              Jason Fowler
              Integrator:
              Sam Hemelryk
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Sep/14