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

Delete not fully setup users - separate admin setting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9
    • Fix Version/s: 1.8.6, 1.9.2
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      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);
      }

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            skodak Petr Skoda
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Jul/08