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

mdl_user_private_key's are not cleaned up when a user is deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.7, 2.4.4, 2.5
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      BEFORE UPGRADE:

      1. Enable RSS in advanced settings and create a forum with rss enabled
      2. Create a user
      3. Login as that user and make a note of their userid
      4. visit the forum as that user
      5. Click the rss link in the settings block of any forum (you should get a link with a token in the middle)
      6. Logout as that user
      7. Use database to verify that a token exists for the user you created and logged in as
        SELECT * FROM mdl_user_private_key WHERE userid = USERIDYOUFOUND;
      8. Login as an admin and delete the user you created
      9. Use the database to verify that the token still exists

      UPGRADE..

      1. VERIFY: that the users token that you just checked for has now been removed
      2. VERIFY: Repeat the pre-upgrade steps and VERIFY that the users token is deleted now when the user is deleted.
      Show
      BEFORE UPGRADE: Enable RSS in advanced settings and create a forum with rss enabled Create a user Login as that user and make a note of their userid visit the forum as that user Click the rss link in the settings block of any forum (you should get a link with a token in the middle) Logout as that user Use database to verify that a token exists for the user you created and logged in as SELECT * FROM mdl_user_private_key WHERE userid = USERIDYOUFOUND; Login as an admin and delete the user you created Use the database to verify that the token still exists UPGRADE.. VERIFY: that the users token that you just checked for has now been removed VERIFY: Repeat the pre-upgrade steps and VERIFY that the users token is deleted now when the user is deleted.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-33562-master

      Description

      I discovered while testing MDL-33514 that user_private_key information is not removed when a user is deleted.

      This issue is to remove it when user is deleted and add an upgrade step to remove old keys which aren't deleted.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              poltawski Dan Poltawski
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/13