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

Delete not fully setup users - separate admin setting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.8.6, 1.9.2
    • 1.8, 1.9
    • General
    • None
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      if (!empty($CFG->deleteunconfirmed)) {
      $cuttime = $timenow - ($CFG->deleteunconfirmed * 3600);
      $rs = get_recordset_sql ("SELECT id, username
      FROM {$CFG->prefix}user
      WHERE confirmed = ********1**********//this seems wrong
      AND lastaccess > 0
      AND lastaccess < $cuttime
      AND deleted = 0
      AND (lastname = '' OR firstname = '' OR email = '')");
      while ($user = rs_fetch_next_record($rs)) {
      if (delete_records('user', 'id', $user->id))

      { mtrace("Deleted not fully setup user $user->username ($user->id)"); }

      }
      rs_close($rs);
      }

            skodak Petr Skoda (Inactive)
            skodak Petr Skoda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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