On Feb 7, 2008 10:59 PM, Tim Laqua t.laqua@gmail.com wrote:
Any thoughts on where I should assign references to the old user to if they're just trying to 'delete' a user? Anonymous (ID 0) maybe, but then what would be appropriate for 'text' fields - doesn't that need to fit the form of an IP? Or I suppose I could just *require* they figure out where they want to assign the old references and stop making that 'user_id 1' assumption.
Why don't you just rename the first deleted account to "Deleted user" or whatever, and then merge all subsequent deletions there? If there's no real user id associated with the new account, you can't (for instance) do anything sensible with log entries.
If you do this, I would suggest you not hardcode the name (even localizably), because that could cause problems with existing users' names -- especially if it's localizable, and updates may add new localizations. (There is a User:Deleted on enwiki, and a User:Deleted User 12, but no User:Deleted user yet. :) ) Instead, when the first deletion occurs, ask for a name to be entered, prefilling with some nice wfMsgForContent()ed string. Then check if the submitted username is already in use. If not, rename to that account and record the fact somewhere, so you don't have to ask in the future. If it is in use, refuse to do it, or ask for confirmation.