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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3, 2.3.7, 2.4.4, 2.5
    • 2.3.8, 2.4.5, 2.5.1
    • Libraries
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-33562-master
    • 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.

    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

              poltawski Dan Poltawski
              poltawski Dan Poltawski
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ankit Agarwal Ankit Agarwal
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13