"delete user" currently not a good idea

RESOLVED FIXED

Status

P3
normal
RESOLVED FIXED
20 years ago
3 years ago

People

(Reporter: dmose, Assigned: reed)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

20 years ago
as it may leave dangling pointers, esp. in the members and changes tables.
(Reporter)

Updated

20 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 1

20 years ago
This has the side-effect that sending mail to all despot users generates bunches
of bounces.
Can we just get rid of :

375     print MyForm("DeleteUser") . hidden(-name=>"email");
376     print submit("Delete user");

and

381 sub DeleteUser() {
382     my $q = SqlQuote($F::email);
383     Query("delete from users where email = '$q'");
384     Query("insert into syncneeded (needed) values (1)");
385     print h1("OK, $F::email is gone.");
386     print hr();
387     MainMenu();
388 }


This disables the delete user code (better yet comment it out so it can 
come back again easily) We should fix the problems with deleting users, 
but if it causes problems in the tables, and a user can be suspended 
which does the same ammount of good, it is a lower priority then just 
taking out the feature.
(Reporter)

Comment 3

18 years ago
I've disabled this as Zach suggested to help avoid database corruption until a
fix happens.  Resetting the bug state to NEW, as I'm not actively working on
this at the moment.
Status: ASSIGNED → NEW
(Reporter)

Comment 4

18 years ago
Mass re-assign of despot bugs to endico@mozilla.org, the new owner.  I'm
switching groups to go work on mozilla LDAP integration.
QA Contact: matty
(Reporter)

Comment 5

18 years ago
Another try at mass-reassigning my Despot bugs to endico.
Assignee: dmose → endico
reassigning endico's Despot bugs to the default component owner
Assignee: endico → justdave
QA Contact: mattyt-bugzilla → timeless
(Assignee)

Updated

12 years ago
QA Contact: timeless → despot
(Assignee)

Comment 8

12 years ago
Created attachment 247321 [details] [diff] [review]
patch - v1

To fix referential integrity problems, the user must be deleted from both the members and users table. This patch first converts the e-mail address to the id and checks to make sure it is valid. Afterwards, it deletes the user from both the members and users table. In the end, it adds an entry to the changes table acting like the admin has changed the "deleted" flag for the user from 'No' to 'Yes'.
Assignee: justdave → reed
Status: NEW → ASSIGNED
Attachment #247321 - Flags: review?(justdave)
(Assignee)

Comment 9

12 years ago
NOTE: You have to set $EnableDeleteUser to 1 for this to actually work. I'd prefer to just drop that variable completely now that the function works. It seems it was added in bug 320105.
OS: Linux → All
Hardware: PC → All

Updated

12 years ago
Attachment #247321 - Flags: review?(justdave) → review+
(Assignee)

Comment 10

12 years ago
Checking in despot.cgi;
/cvsroot/mozilla/webtools/despot/despot.cgi,v  <--  despot.cgi
new revision: 1.45; previous revision: 1.44
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.