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

Invalid user error shows on Data requests page

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Put the following to your config.php

        $CFG->deleteunconfirmed = 1 / 3600;
        

      2. Go to Site administration > Plugins > Authentication > Manage authentication
      3. Enable Self registration via email
      4. Self-register as a new user
      5. Run cron
      6. Go to Site administration > Users > Privacy and policies > Data requests
      7. TEST Confirm the error is not displayed and the page works as expected
      8. Delete that added line from your config.php
      Show
      Put the following to your config.php $CFG->deleteunconfirmed = 1 / 3600; Go to Site administration > Plugins > Authentication > Manage authentication Enable Self registration via email Self-register as a new user Run cron Go to Site administration > Users > Privacy and policies > Data requests TEST Confirm the error is not displayed and the page works as expected Delete that added line from your config.php
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-64205-35-sarunconfirmeduser
    • Pull Master Branch:
      MDL-64205-master-sarunconfirmeduser

      Description

      This has been originally reported by Mary Cooch at her own site and I was able to reproduce it.

      Say a user self-registers but does not confirm the account. Eventually the task delete_unconfirmed_users_task gets executed and an automatic request to delete the user's data is created (via the observer introduced in MDL-62564), but the user's account is immediately deleted. So we end up with a record in the tool_dataprivacy_request table pointing to a non-existing userid.

      I believe we should not delete the actual user record - even for unconfirmed users - same as we do not deleted them in the delete_incomplete_users_task

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Nov/18

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h