Manual:User table/zh

user表是MediaWiki用來儲存用戶資訊的地方. 如果使用Postgres，這個表會被命名為mwuser.

字段
''有的信息从 MediaWiki  目录的   改写而来. ''

user_id
user_id是主鍵，用於唯一地辨識用戶.

user_name
user_name: 用戶名必須是獨一無二的，並且不能是IP地址的格式. 不應該允許斜線或大小寫衝突. 参见. 允許空格，並下劃線會被轉換為空格（與頁面名稱相反）.

user_real_name
user_real_name儲存用戶在「偏好設定」中提供的真實姓名（選填）.

user_password
user_password使以下三種之一的格式，根據了和的設定：


 * 從MediaWiki 1.24開始，$wgPasswordDefault預設為pbkdf2. 这时你会得到以下各项的连接：
 * 字串「:pbkdf2:」.
 * pbkdf2层用的散列函数，默认是“sha512”.
 * 冒号（“:”）.
 * 算法的成本，默认“30000”.
 * 冒号（“:”）.
 * 子密钥长度；默认“64”.
 * 冒号（“:”）.
 * 散列算法的Base64编码的“盐”，例如“kkdejKlBYFV7+LP2m2thYA==”
 * 冒号（“:”）.
 * 最终是Base64编码的散列算法的结果（base64编码前（默认）长度是128字节） 用户密码明文的哈希值.
 * Since MediaWiki 1.24, if the maintenance script has been used, passwords may also start with ":pbkdf2-legacyA:" or ":pbkdf2-legacyB:" like ":pbkdf2-legacyB:!sha256:10000:128!...".
 * In MediaWiki 1.23 and older, if $wgPasswordSalt is true (default) it is a concatenation of:
 * 字符串“:B:”，
 * A pseudo-random hexadecimal 31-bit salt between 0x0 and 0x7fff ffff (inclusive),
 * The colon character (":"), and
 * The MD5 hash of a concatenation of the salt, a dash ("-"), and the MD5 hash of the password.
 * In MediaWiki 1.23 and older, if $wgPasswordSalt is false, it is a concatenation of:
 * 字符串":A:" 和
 * 密码的MD5哈希值.

user_newpassword
user_newpassword is generated for the mail-a-new-password feature.

user_newpass_time
user_newpass_time is set to the current (wfTimestampNow) when a new password is set. Like the other timestamps, it is in in MediaWiki's timestamp format (yyyymmddhhmmss, e.g. 20130824025644).

user_options
user_options is no longer used as of MediaWiki 1.16. 参见.

On older versions of mediawiki, it is a newline-separated list of name=value pairs of the information of Special:Preferences. Old user accounts who haven't logged in since the field stopped being used may still have this field set.

user_touched
user_touched the last time a user made a change on the site, including logins, changes to pages (any namespace), watchlistings, and preference changes.

user_token
user_token是伪随机方法产生的值. When a user checks "Remember my login on this browser" the value is stored in a persistent browser cookie  that authenticates the user while being resistant to spoofing.

user_email_authenticated
user_email_authenticated是用户验证了电子邮箱的时间的时间戳. 默认是NULL

user_email_token
user_email_token是用于确认电子邮箱地址的令牌. 参见 User.php 中的 User::newFromConfirmationCode

user_email_token_expires
user_email_token_expires is the expiration timestamp of the email token.

user_registration
user_registration是用户注册时间的时间戳. 对于老用户，此域可能有NULL值. 脚本可以用于事后填写此域.

user_editcount
user_editcount是用户大致的编辑次数和用户完成的像编辑一样的操作. 下列操作属于编辑：
 * Creating or modifying a MediaWiki page even if the revision or page is later deleted (i.e. making a non-null edit)
 * Creating or modifying a post on a Structured Discussions (former "Flow") board
 * Moving a page to a new title (since version 1.30)

This field is not an exactly accurate copy of. However, it should be roughly accurate if the update scripts are consistently run and it's the only place edit count data is available to the software, so it's still used for serious purposes like deciding whether accounts have been autopromoted.

有许多事情可以导致此值错误. 例如，它可能过时，或者对于老用户来说如果升级脚本（）没有运行，就会是NULL. 而且，某些删除操作可能不会正确影响它.

user_emailauthenticationtimestamp
在v1.4版本中移除.

user_password_expires
Date when user's password expires; null for no expiration date. Can also be set manually by calling User->expirePassword.

模式摘要
+--+--+--+-+--++ +--+--+--+-+--++ +--+--+--+-+--++
 * Field                   | Type             | Null | Key | Default                          | Extra          |
 * user_id                 | int(10) unsigned | NO   | PRI | NULL                             | auto_increment |
 * user_name               | varbinary(255)   | NO   | UNI |                                  |                |
 * user_real_name          | varbinary(255)   | NO   |     |                                  |                |
 * user_password           | tinyblob         | NO   |     | NULL                             |                |
 * user_newpassword        | tinyblob         | NO   |     | NULL                             |                |
 * user_newpass_time       | binary(14)       | YES  |     | NULL                             |                |
 * user_email              | tinyblob         | NO   | MUL | NULL                             |                |
 * user_touched            | binary(14)       | NO   |     |                                  |                |
 * user_token              | binary(32)       | NO   |     |                                  |                |
 * user_email_authenticated | binary(14)      | YES  |     | NULL                             |                |
 * user_email_token        | binary(32)       | YES  | MUL | NULL                             |                |
 * user_email_token_expires | binary(14)      | YES  |     | NULL                             |                |
 * user_registration       | binary(14)       | YES  |     | NULL                             |                |
 * user_editcount          | int(11)          | YES  |     | NULL                             |                |
 * user_password_expires   | varbinary(14)    | YES  |     | NULL                             |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(10) unsigned    | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_newpass_time       | binary(14)          | YES  |     | NULL    |                |
 * user_email              | tinytext            | NO   | MUL | NULL    |                |
 * user_touched            | binary(14)          | NO   |     | NULL    |                |
 * user_token              | binary(32)          | NO   |     | NULL    |                |
 * user_email_authenticated | binary(14)         | YES  |     | NULL    |                |
 * user_email_token        | binary(32)          | YES  | MUL | NULL    |                |
 * user_email_token_expires | binary(14)         | YES  |     | NULL    |                |
 * user_registration       | binary(14)          | YES  |     | NULL    |                |
 * user_editcount          | int(11)             | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(10) unsigned    | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_newpass_time       | binary(14)          | YES  |     | NULL    |                |
 * user_email              | tinytext            | NO   | MUL | NULL    |                |
 * user_options            | blob                | NO   |     | NULL    |                |
 * user_touched            | binary(14)          | NO   |     | NULL    |                |
 * user_token              | binary(32)          | NO   |     | NULL    |                |
 * user_email_authenticated | binary(14)         | YES  |     | NULL    |                |
 * user_email_token        | binary(32)          | YES  | MUL | NULL    |                |
 * user_email_token_expires | binary(14)         | YES  |     | NULL    |                |
 * user_registration       | binary(14)          | YES  |     | NULL    |                |
 * user_editcount          | int(11)             | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(10) unsigned    | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_newpass_time       | binary(14)          | YES  |     | NULL    |                |
 * user_email              | tinytext            | NO   |     | NULL    |                |
 * user_options            | blob                | NO   |     | NULL    |                |
 * user_touched            | binary(14)          | NO   |     | NULL    |                |
 * user_token              | binary(32)          | NO   |     | NULL    |                |
 * user_email_authenticated | binary(14)         | YES  |     | NULL    |                |
 * user_email_token        | binary(32)          | YES  | MUL | NULL    |                |
 * user_email_token_expires | binary(14)         | YES  |     | NULL    |                |
 * user_registration       | binary(14)          | YES  |     | NULL    |                |
 * user_editcount          | int(11)             | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_newpass_time       | char(14) binary     | YES  |     | NULL    |                |
 * user_email              | tinytext            | NO   |     | NULL    |                |
 * user_options            | blob                | NO   |     | NULL    |                |
 * user_touched            | char(14) binary     | NO   |     | NULL    |                |
 * user_token              | char(32) binary     | NO   |     | NULL    |                |
 * user_email_authenticated | char(14) binary    | YES  |     | NULL    |                |
 * user_email_token        | char(32) binary     | YES  | MUL | NULL    |                |
 * user_email_token_expires | char(14) binary    | YES  |     | NULL    |                |
 * user_registration       | char(14) binary     | YES  |     | NULL    |                |
 * user_editcount          | int(11)             | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_email              | tinytext            | NO   |     | NULL    |                |
 * user_options            | blob                | NO   |     | NULL    |                |
 * user_touched            | char(14) binary     | NO   |     | NULL    |                |
 * user_token              | char(32) binary     | NO   |     | NULL    |                |
 * user_email_authenticated | char(14) binary    | YES  |     | NULL    |                |
 * user_email_token        | char(32) binary     | YES  | MUL | NULL    |                |
 * user_email_token_expires | char(14) binary    | YES  |     | NULL    |                |
 * user_registration       | char(14) binary     | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type                | Null | Key | Default | Extra          |
 * user_id                 | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name               | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name          | varchar(255) binary | NO   |     | NULL    |                |
 * user_password           | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword        | tinyblob            | NO   |     | NULL    |                |
 * user_email              | tinytext            | NO   |     | NULL    |                |
 * user_options            | blob                | NO   |     | NULL    |                |
 * user_touched            | char(14) binary     | NO   |     | NULL    |                |
 * user_token              | char(32) binary     | NO   |     | NULL    |                |
 * user_email_authenticated | char(14) binary    | YES  |     | NULL    |                |
 * user_email_token        | char(32) binary     | YES  | MUL | NULL    |                |
 * user_email_token_expires | char(14) binary    | YES  |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field           | Type                | Null | Key | Default | Extra          |
 * user_id         | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name       | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name  | varchar(255) binary | NO   |     | NULL    |                |
 * user_password   | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword | tinyblob           | NO   |     | NULL    |                |
 * user_email      | tinytext            | NO   |     | NULL    |                |
 * user_options    | blob                | NO   |     | NULL    |                |
 * user_touched    | char(14) binary     | NO   |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field           | Type                | Null | Key | Default | Extra          |
 * user_id         | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name       | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_real_name  | varchar(255) binary | NO   |     | NULL    |                |
 * user_rights     | tinyblob            | NO   |     | NULL    |                |
 * user_password   | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword | tinyblob           | NO   |     | NULL    |                |
 * user_email      | tinytext            | NO   |     | NULL    |                |
 * user_options    | blob                | NO   |     | NULL    |                |
 * user_touched    | char(14) binary     | NO   |     | NULL    |                |

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field           | Type                | Null | Key | Default | Extra          |
 * user_id         | int(5) unsigned     | NO   | PRI | NULL    | AUTO_INCREMENT |
 * user_name       | varchar(255) binary | NO   | MUL | NULL    |                |
 * user_rights     | tinyblob            | NO   |     | NULL    |                |
 * user_password   | tinyblob            | NO   |     | NULL    |                |
 * user_newpassword | tinyblob           | NO   |     | NULL    |                |
 * user_email      | tinytext            | NO   |     | NULL    |                |
 * user_options    | blob                | NO   |     | NULL    |                |
 * user_touched    | char(14) binary     | NO   |     | NULL    |                |