Podręcznik:Tabela user

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:User table and the translation is 68% complete.

Other languages:
English • ‎español • ‎polski • ‎中文 • ‎日本語 • ‎한국어
Podręcznik:Spis treści Opis i struktura bazy danych MediaWiki user table/pl


Tabela user jest miejscem, gdzie MediaWiki przechowuje informacje o użytkownikach. Jeżeli korzystasz z Postgres, ta tabela ma nazwę mwuser.

Pola

Niektóre z tych informacji zostały pobrane z pliku schema.doc w katalogu docs/ MediaWiki.

user_id

user_id jest kluczem podstawowym, wykorzystywanym do unikalnej identyfikacji użytkownika

user_name

user_name: Nazwy użytkowników muszą być unikalne i nie mogą mieć formatu adresu IP. Nie powinny mieć możliwości użycia ukośników i konfliktów wielkości liter. Zobacz też Podręcznik:$wgInvalidUsernameCharacters . Dozwolone są spacje, a podkreślenia są zamieniane na spacje (odwrotnie niż w przypadku nazw stron).

user_real_name

Wersja MediaWiki: 1.3

user_real_name przechowuje prawdziwe imię i nazwisko użytkownika (nieobowiązkowe) podaną w preferencjach.

user_password

user_password - zawartość jest w jednym z trzech dostępnych formatów w zależności od ustawienia $wgPasswordSalt oraz $wgPasswordDefault :

  • Od MediaWiki 1.24, $wgPasswordDefault domyślnie to pbkdf2. W tym przypadku będzie to połączenie:
    • Ciągu ":pbkdf2:".
    • Algorytmu hashowania użytego w warstwie pbkdf2, domyślnie "sha512".
    • Znaku dwukropka (":").
    • Kosztu tego algorytmu, domyślnie "30000".
    • Znaku dwukropka (":").
    • Długości pochodnego klucza; domyślnie "64".
    • Znaku dwukropka (":").
    • Zakodowana w Base64 "sól" algorytmu hashowania, np. "kkdejKlBYFV7+LP2m2thYA=="
    • Znaku dwukropka (":").
    • And finally the base64 encoded result of the hashing algorithm (that had a (default) length of 128 byte before base64 encoding). The hash of the plain text user password.
  • Od MediaWiki 1.24, jeżeli użyto skryptu wrapOldPasswords.php , hasła mogą zaczynać się tez od ":pbkdf2-legacyA:" lub ":pbkdf2-legacyB:", na przykład ":pbkdf2-legacyB:!sha256:10000:128!...".
  • W MediaWiki 1.23 i starszych, jeżeli $wgPasswordSalt ustawiono na true (domyślnie) to jest połączeniem:
    • Ciągu ":B:",
    • Pseudolosowej szesnastkowej 31-bitowej soli między 0x0 a 0x7fff ffff (włącznie),
    • Znaku dwukropka (":"), oraz
    • Hashu MD5 połączenia soli, myślnika ("-") i hashu MD5 hasła.
  • W MediaWiki 1.23 i starszych, jeżeli $wgPasswordSalt jest ustawione na false, jest połączeniem:
    • Ciągu ":A:" oraz
    • Hashu MD5 hasła.

user_newpassword

user_newpassword jest generowane dla funkcji "wyślij mi nowe hasło".

user_newpass_time

user_newpass_time jest ustawiane na bieżący timestamp (wfTimestampNow()) podczas ustawiania nowego hasła. Tak jak inne znaczniki czasu, jest w formacie znacznika czasu MediaWiki (yyyymmddhhmmss, np. 20130824025644).

user_email

e-mail nie powinien być upubliczniany. Tak samo jak hasła. ;)

Note that this field is not nullable, so users who have never supplied an email address have an empty string set.

user_options

Wersja MediaWiki: 1.18

user_options nie jest dłużej wykorzystywane od MediaWiki 1.16. Zobacz Podręcznik:Tabela user_properties .

W starszych wersjach MediaWiki jest to lista oddzielanych nowymi liniami par nazwa=wartość z informacjami z Special:Preferences. Stare konta użytkowników, na które się nie logowano od czasu, kiedy zaprzestano wykorzystywania tego pola mogą mieć nadal ustawioną zawartość w ty polu.

user_touched

user_touched ostatni czas kiedy użytkownik dokonał zmian na stronie, włączając zalogowanie, zmiany na stronach (w dowolnej przestrzeni nazw), dodawanie do obserwowanych i zmiany preferencji.

Czas w user_touched resetuje się, jeżeli użytkownik ma pozostawioną wiadomość na swojej stronie dyskusji.

user_token

Wersja MediaWiki: 1.4

user_token jest wartością wygenerowaną pseudolosową. When a user checks "Remember my login on this browser" the value is stored in a persistent browser cookie ${wgCookiePrefix}Token that authenticates the user while being resistant to spoofing.

user_email_authenticated

user_email_authenticated is the timestamp of when the user email was authenticated. Defaults to NULL.

user_email_token

Wersja MediaWiki: 1.5

user_email_token is a token used for confirming an email address. See User::newFromConfirmationCode in User.php

user_email_token_expires

user_email_token_expires is the expiration timestamp of the email token.

user_registration

Wersja MediaWiki: 1.6

user_registration is the timestamp of when the user registered. For old users, they may have a value of NULL for this field. The fixUserRegistration.php script can be used to back-populate this field.

user_editcount

Wersja MediaWiki: 1.9

user_editcount is the rough number of edits and edit-like actions the user has performed. The following actions are counted as edits:

  • 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 COUNT(*) FROM revision WHERE rev_user = user_id. 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.

A number of things could cause this value to be incorrect. For example, it may be out of date or, for old accounts, NULL if the update script (initEditCount.php ) hasn't been run. Also, some deletions may not affect it consistently.

user_emailauthenticationtimestamp

Wersja MediaWiki: 1.3

Removed in v1.4.

user_password_expires

Wersja MediaWiki: 1.23

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

Podsumowanie struktury

Wersja MediaWiki: 1.23

DESCRIBE user;

+--------------------------+------------------+------+-----+----------------------------------+----------------+
| 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                             |                |
+--------------------------+------------------+------+-----+----------------------------------+----------------+
Wersje MediaWiki: 1.19 – 1.22

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersja MediaWiki: 1.18

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersje MediaWiki: 1.10 – 1.17

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersja MediaWiki: 1.9

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersje MediaWiki: 1.6 – 1.8

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersja MediaWiki: 1.5

DESCRIBE user;

+--------------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+--------------------------+---------------------+------+-----+---------+----------------+
Wersja MediaWiki: 1.4

DESCRIBE user;

+------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+------------------+---------------------+------+-----+---------+----------------+
Wersja MediaWiki: 1.3

DESCRIBE user;

+------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+------------------+---------------------+------+-----+---------+----------------+
Wersje MediaWiki: 1.1 – 1.2

DESCRIBE user;

+------------------+---------------------+------+-----+---------+----------------+
| 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    |                |
+------------------+---------------------+------+-----+---------+----------------+

Zobacz też