Mailing List Archive

Changing a user's username
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?

Any info is appreciated.

Thanks,
Matias
Re: Changing a user's username [ In reply to ]
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.

Set the oldname and newname variables at the top to the old and new
names (use spaces, not underscores!) and run it through the mysql
command-line client or phpmyadmin or whatever you've got to run SQL
scripts into.

It's a little ugly, but it works (has been used on Wikipedia a number of
times.)

I'd recommend backing up your database before running any manual scripts
in case you make a mistake; SQL can be unforgiving!

-- brion vibber (brion @ pobox.com)