Mailing List Archive

Deleting Users?
Related to the below - How do I delete a user?...

Thanks, Richard.

On Wed, 2004-07-07 at 12:13, Brion Vibber wrote:
> Matias Pelenur wrote:
> > A user on my MediaWiki site would like to change their username. Is that
> > possible, or better yet, possible and not too hard?
> >
> > I'm guessing that the value in the user.user_name column for the user would have
> > to be changed, and also the title of User page name. Hopefully any other
> > references use the userid? Would pages have to be rebuilt?
>
> There's a helper script for this in the maintenance directory:
> changeuser.sql.
<cut>
Re: Deleting Users? [ In reply to ]
Richard Ames wrote:

> Related to the below - How do I delete a user?...

Depends on just what you need.

If you just need to _lock out_ an account so it can't be used, you can
clear the user_password, user_new_password and user_email fields (to
prevent a new password from being requested by e-mail):

UPDATE user SET user_password='', user_newpassword='', user_email=''
WHERE user_name='Some darn user' LIMIT 1;

I'd recommend against simply deleting the record, as this would allow
anyone to create a new account with the same name, which you probably
don't want as it would be mighty confusing.

If you want to remove the account's edit attributions, you could modify
the change user script to insert "(Deleted user)" or something in place
of their name. (This won't touch signatures or other literal text placed
in pages that uses the name.)

-- brion vibber (brion @ pobox.com)