GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing www.mediawiki.org — Manual:user_groups table - MediaWiki
The user_groups table maps the users in a particular MediaWiki installation to their corresponding user rights. Each group can be assigned a mixture of permissions through LocalSettings.php or via extensions; all users of a particular group have those permissions granted to them as a result of their membership in the group. As the table is separate from the user table, this allows for the creation of a shared user database with permissions that vary from wiki to wiki within a wiki farm. This table was introduced on r5648, in MediaWiki 1.5. If you are using MediaWiki 1.3 or 1.4, have a look at Manual:User rights (older versions) . Before MediaWiki 1.5, user rights were stored in the user_rights field of the user table. All unregistered users automatically belong to the Implicit group memberships and auto-promoted groups such as
*, user, or autoconfirmed are not stored in this table. To retrieve all effective groups use UserGroupManager::getUserEffectiveGroups() .Fieldsug_userThis field links to a given user's user_id . It is a foreign key used to link accounts with their assigned privileges. ug_groupThis field stores the user's permissions, which are stored as groups.
At runtime, $wgGroupPermissions will associate group keys with particular permissions; a user will have the combined permissions of any group they're explicitly in, plus the implicit There is one row for each (explicit) group the user is in. ug_expiry
This field stores a user group's expiry time. It is similar to pr_expiry in the page_restrictions table and ipb_expiry in the ipblocks table. Schema summary
+-----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------------+------+-----+---------+-------+ | ug_user | int(10) unsigned | NO | PRI | 0 | | | ug_group | varbinary(255) | NO | PRI | | | | ug_expiry | varbinary(14) | YES | MUL | NULL | | +-----------+------------------+------+-----+---------+-------+
+----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+------------------+------+-----+---------+-------+ | ug_user | int(10) unsigned | NO | PRI | 0 | | | ug_group | varbinary(255) | NO | PRI | | | +----------+------------------+------+-----+---------+-------+
+----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+------------------+------+-----+---------+-------+ | ug_user | int(10) unsigned | NO | PRI | 0 | | | ug_group | varbinary(32) | NO | PRI | | | +----------+------------------+------+-----+---------+-------+
+----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+------------------+------+-----+---------+-------+ | ug_user | int(10) unsigned | NO | PRI | 0 | | | ug_group | varbinary(16) | NO | PRI | | | +----------+------------------+------+-----+---------+-------+
+----------+-----------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-----------------+------+-----+---------+-------+ | ug_user | int(5) unsigned | NO | PRI | 0 | | | ug_group | char(16) | NO | PRI | | | +----------+-----------------+------+-----+---------+-------+ Indexes
+-------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | user_groups | 0 | PRIMARY | 1 | ug_user | A | 0 | NULL | NULL | | BTREE | | | | user_groups | 0 | PRIMARY | 2 | ug_group | A | 0 | NULL | NULL | | BTREE | | | | user_groups | 1 | ug_group | 1 | ug_group | A | 0 | NULL | NULL | | BTREE | | | | user_groups | 1 | ug_expiry | 1 | ug_expiry | A | 0 | NULL | NULL | YES | BTREE | | | +-------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ Default MediaWiki groupsIn a default MediaWiki installation, ug_group can be one of the following:
+------------+ | ug_group | +------------+ | bot | | bureaucrat | | sysop | +------------+ | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |