Issue Details (XML | Word | Printable)

Key: MDL-15021
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Petr Skoda
Reporter: Petr Skoda
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Delete not fully setup users - separate admin setting

Created: 27/May/08 10:42 PM   Updated: 03/Jul/08 10:09 PM
Return to search
Component/s: General
Affects Version/s: 1.8, 1.9
Fix Version/s: 1.8.6, 1.9.2

Participants: Martin Dougiamas and Petr Skoda
Security Level: None
Resolved date: 03/Jul/08
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
 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);
        }


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda added a comment - 27/May/08 10:43 PM
We need to evaluate this more, but this definitely seems wrong and may result in major data loss.

Petr Skoda added a comment - 27/May/08 10:48 PM
imo it should do normal delete, because data might already exist in system
also it should not abuse the $CFG->deleteunconfirmed and have own setting

Martin Dougiamas added a comment - 27/May/08 11:04 PM - edited
Yes it needs a new setting (deleteincompleteusers default 0) and yes I agree it should do a normal delete.

confirmed is probably correct as 1


Petr Skoda made changes - 30/May/08 08:33 PM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Petr Skoda added a comment - 03/Jul/08 06:00 PM
working on this...

Petr Skoda made changes - 03/Jul/08 10:07 PM
Summary Deleted not fully setup user only if not confirmed Deleted not fully setup separate cadmin settings
Petr Skoda made changes - 03/Jul/08 10:07 PM
Summary Deleted not fully setup separate cadmin settings Deleted not fully setup separate admin settings
Petr Skoda committed 3 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 03/Jul/08 10:07 PM
MDL-15021 Deleted not fully setup separate admin settings
MODIFY admin/cron.php   Rev. 1.98.2.12    (+3 -3 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.103.2.23    (+4 -1 lines)
MODIFY admin/settings/server.php   Rev. 1.13.2.5    (+10 -1 lines)
Petr Skoda committed 3 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 03/Jul/08 10:08 PM
MDL-15021 Deleted not fully setup separate admin settings; merged from MOODLE_18_STABLE but with better delete
MODIFY admin/cron.php   Rev. 1.126.2.13    (+4 -4 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.42    (+3 -1 lines)
MODIFY admin/settings/server.php   Rev. 1.26.2.15    (+10 -1 lines)
Petr Skoda committed 3 files to 'Moodle CVS' - 03/Jul/08 10:09 PM
MDL-15021 Deleted not fully setup separate admin settings; merged from MOODLE_18_STABLE but with better delete
MODIFY lang/en_utf8/admin.php   Rev. 1.199    (+3 -1 lines)
MODIFY admin/cron.php   Rev. 1.145    (+4 -4 lines)
MODIFY admin/settings/server.php   Rev. 1.42    (+10 -1 lines)
Petr Skoda made changes - 03/Jul/08 10:09 PM
Summary Deleted not fully setup separate admin settings Delete not fully setup users - separate admin setting
Petr Skoda added a comment - 03/Jul/08 10:09 PM
fixed in cvs

Petr Skoda made changes - 03/Jul/08 10:09 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mitsuhiro Yoshida committed 7 files to 'Lang CVS' - 05/Jul/08 09:21 AM
Translated new strings for admin MDL-15021.
Updated a translated string for auth based on lang/en_utf8 change MDL-15544.
Translated a new string for enrol authorize.net.
Translated a new string for grade MDL-14840.
Updated translated help file for quiz export and import based on lang/en_utf8 change MDL-13007.
MODIFY ja_utf8/enrol_authorize.php   Rev. 1.57    (+2 -1 lines)
MODIFY ja_utf8/help/quiz/importcategory.html   Rev. 1.4    (+2 -2 lines)
MODIFY ja_utf8/grades.php   Rev. 1.139    (+2 -1 lines)
MODIFY ja_utf8/README   Rev. 1.751    (+1 -1 lines)
MODIFY ja_utf8/admin.php   Rev. 1.270    (+5 -3 lines)
MODIFY ja_utf8/help/quiz/exportcategory.html   Rev. 1.3    (+2 -2 lines)
MODIFY ja_utf8/auth.php   Rev. 1.68    (+2 -2 lines)
martignoni committed 1 file to 'Lang CVS' - 05/Jul/08 05:42 PM
MDL-15021 new strings
MODIFY fr_utf8/admin.php   Rev. 1.258    (+3 -1 lines)