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

cron is broken when deleting uncompleted users

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0.4, 2.1.1
    • 2.0.3, 2.1
    • Libraries
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • w29_MDL-28182_m22_userdel
    • Hide

      The delete_user() needs $user->email and requires $user->auth. But the cronlib selects id and username only.
      So I added them.
      But I don't know how to remove the tailing end of line in the last line, sorry.

      Show
      The delete_user() needs $user->email and requires $user->auth. But the cronlib selects id and username only. So I added them. But I don't know how to remove the tailing end of line in the last line, sorry.
    • Hide

      see replication instructions

      Show
      see replication instructions

      in cron's ourput:

      done.
      Running clean-up tasks...
      PHP Notice: Undefined property: stdClass::$email in /var/www/xxxx/lib/moodlelib.php on line 3516

      Notice: Undefined property: stdClass::$email in /var/www/xxxx/lib/moodlelib.php on line 3516
      PHP Notice: Undefined property: stdClass::$auth in /var/www/xxxx/lib/moodlelib.php on line 3533

      Notice: Undefined property: stdClass::$auth in /var/www/xxxx/lib/moodlelib.php on line 3533

      Default exception handler: Authentication plugin {$a} not found. Debug:

      • line 429 of /lib/setuplib.php: moodle_exception thrown
      • line 3208 of /lib/moodlelib.php: call to print_error()
      • line 3533 of /lib/moodlelib.php: call to get_auth_plugin()
      • line 229 of /lib/cronlib.php: call to delete_user()
      • line 61 of /admin/cli/cron.php: call to cron_run()

      !!! Authentication plugin {$a} not found. !!!
      !! Stack trace: * line 429 of /lib/setuplib.php: moodle_exception thrown

      • line 3208 of /lib/moodlelib.php: call to print_error()
      • line 3533 of /lib/moodlelib.php: call to get_auth_plugin()
      • line 229 of /lib/cronlib.php: call to delete_user()
      • line 61 of /admin/cli/cron.php: call to cron_run()
        !!

      Replication instructions:
      1. $CFG->deleteincompleteusers = 1;
      2. Create an uncompleted user ( confirmed = 1, lastaccess = 1, deleted = 0, email = '' )
      3. run the cron

      I tested it and the patch in 2.0.3 only. And the master is using the same code with 2.0.3

            skodak Petr Skoda
            sunner Sunner Sun (Inactive)
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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