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

Trigger user updated event only after the profile fields are updated

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • wip-mdl-45641
    • Hide

      Test 1:

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

      Test 2:

      1. Upload users with
        1. 1 existing user, updating it's profile
        2. 1 new user
      2. Verifiy user_created and user_updated events are added to report->logs

      Test 3:

      1. Enable email based self registration (Site administration ► Plugins ► Authentication ► Manage authentication)
      2. set "Self registartion" to "Email-based self-registration
      3. Create new account.
      4. Verify user_created event is added to report->logs

      Test 4:

      1. Create new user and verify user_created entry is added to report->logs
      2. Update user profile, change password
      3. Verify user_updated and user_password_updated entry is added to report->logs

      Test 5:

      1. Test above create/update user with webservice
      2. Verify user_created and user_updated log is added to report->logs with proper origin.

      Test 6:

      1. Go to My profile settings ► Change password
      2. Verify user_password_updated log is added to report->logs.

      Test 6:

      1. Go to login page and click "Forgotten your username or password?"
      2. Enter username and check mail
      3. Click link and update password
      4. Verify user_password_updated log is added to report->logs.

      Test 7:

      1. run phpunit (ensure LDAP is not skipped).

      NOTE: 26 there is no user_password_updated event, so user_updated event will be generated, when updating password. (multiple events for user edit). Please do make sure you test this on 26.

      Show
      Test 1: Run phpunit user/tests/userlib_test.php Run phpunit lib/tests/moodlelib_test.php Test 2: Upload users with 1 existing user, updating it's profile 1 new user Verifiy user_created and user_updated events are added to report->logs Test 3: Enable email based self registration (Site administration ► Plugins ► Authentication ► Manage authentication) set "Self registartion" to "Email-based self-registration Create new account. Verify user_created event is added to report->logs Test 4: Create new user and verify user_created entry is added to report->logs Update user profile, change password Verify user_updated and user_password_updated entry is added to report->logs Test 5: Test above create/update user with webservice Verify user_created and user_updated log is added to report->logs with proper origin. Test 6: Go to My profile settings ► Change password Verify user_password_updated log is added to report->logs. Test 6: Go to login page and click "Forgotten your username or password?" Enter username and check mail Click link and update password Verify user_password_updated log is added to report->logs. Test 7: run phpunit (ensure LDAP is not skipped). NOTE: 26 there is no user_password_updated event, so user_updated event will be generated, when updating password. (multiple events for user edit). Please do make sure you test this on 26.

      user_created and user_updated events not called after custom profile data is saved in user/editadvanced.php ...
      Seems the event trigger code was moved to functions:
      user_create_user() and user_update_user()
      however, these are called before the custom profile data is saved.

      This still works in Moodle versions before 2.6

            rajeshtaneja Rajesh Taneja
            brentboghosian Brent Boghosian
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Jason Fowler Jason Fowler
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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