Last modified: 2011-03-13 18:06:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14569 - Create the 'MediaWiki default' user on wiki creation, or on upgrade if user does not exist.
Create the 'MediaWiki default' user on wiki creation, or on upgrade if user d...
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Lowest minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-06-17 05:15 UTC by Nick Jenkins
Modified: 2011-03-13 18:06 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Nick Jenkins 2008-06-17 05:15:00 UTC
The 'MediaWiki default' user is used by MediaWiki as a system-level user, to record actions performed by MediaWiki itself or by extension. For example, the very first edit to initialise the "Main Page" on a new wiki is performed by the 'MediaWiki default' user.

However, this user does not seem to be created during wiki creation. ( Note: I have only tested this with 1.12.0 stable, and on a very quick examination it still looks like this is the case in SVN head, but I could be wrong ). As shown with an example database query:

mysql> select * from user where user_name like 'MediaWiki default';
Empty set (0.00 sec)

mysql> select * from revision where rev_user_text = 'MediaWiki default';
| rev_id | rev_page | rev_text_id | rev_comment | rev_user | rev_user_text     | rev_timestamp  | rev_minor_edit | rev_deleted | rev_len | rev_parent_id |
|      1 |        1 |           1 |             |        0 | MediaWiki default | 20080522074310 |              0 |           0 |     449 |          NULL |
1 row in set (0.00 sec)

The 'MediaWiki default' user is referred to in ~ 7 places in core (grep -nr 'MediaWiki default' includes/ config/ maintenance/ ), and ~ 5 places in extensions (grep -nr 'MediaWiki default' extensions/ ). 

My primary concern is for logging - I would like to be able to add something to the log, from the 'MediaWiki default' user, and have it appear normally in [[Special:Log]]. However at the moment such
entries do not appear, because Special:Log performs a join between the user table and the logging table. One possible solution may be to create the 'MediaWiki default' user when creating the wiki, and possibly also when upgrading the wiki.
Comment 1 Brion Vibber 2008-06-19 16:27:51 UTC
Might be sensible to add it over in the installer, or it might be better actually to assign that installer edit to the initially-created sysop user...
Comment 2 Daniel Friesen 2008-06-19 22:53:26 UTC
I don't know about that. It's quite nice that MW makes automatic edits with a nonexistant user with id0. There are some setups where there may not even be an initial user. Namely Starter wiki like setups where a base db is created but not likely to have a user. Perhaps it would be best to create a "<System>" user with id0 which by definition cannot be logged into.
Comment 3 Chad H. 2008-06-20 12:59:09 UTC
I'm with Daniel on this. The auto-generated edits shouldn't be done by the wikisysop account, as that account isn't doing the editing. 

A userID of 0 for the "system" account makes it _really_ easy to check whether to allow things to be done to it (block, login, etc; none of which should be allowed).
Comment 4 Brion Vibber 2008-07-05 00:17:13 UTC
"There are some setups where there may not even be an initial user."

Well, that would exclude those created with the installer. :)

Note You need to log in before you can comment on or make changes to this bug.