Manual: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  w katalogu   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ż. Dozwolone są spacje, a podkreślenia są zamieniane na spacje (odwrotnie niż w przypadku nazw stron).

user_real_name
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 oraz :


 * 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 "sha256".
 * Znaku dwukropka (":").
 * Kosztu tego algorytmu, domyślnie "10000".
 * Znaku dwukropka (":").
 * Długości pochodnego klucza; domyślnie "128".
 * Znaku dwukropka (":").
 * Innego ciągu, np. "kkdejKlBYFV7+LP2m2thYA=="
 * I ostatecznie kolejnego klucza. (TODO: Opisać lepiej!)
 * Od MediaWiki 1.24, jeżeli użyto skryptu, 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 (wfTimestampNow) podczas ustawiania nowego hasła. Like the other timestamps, it is in in MediaWiki's timestamp format (yyyymmddhhmmss, e.g. 20130824025644).

user_email
user_email email should be restricted, not public info. Same with passwords. ;)

user_options
user_options is no longer used as of MediaWiki 1.16. Zobacz.

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.

The user_touched time resets when a user is left a talkpage message.

user_token
user_token is a pseudorandomly generated value. 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
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
user_registration is the timestamp of when the user registered. For old users, they may have a value of NULL for this field. The script can be used to back-populate this field.

user_editcount
user_editcount Count of edits and edit-like actions.

May contain NULL for old accounts if batch-update scripts haven't been run, as well as listing deleted edits and other myriad ways it could be out of sync. Execute the script to update this table column.
 * NOT* intended to be an accurate copy of.

Meant primarily for heuristic checks to give an impression of whether the account has been used much.

user_emailauthenticationtimestamp
Removed in 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.

Schema summary
(Current as of v1.23)

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

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

mysql> 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   |     |         |                |
 * user_newpassword        | tinyblob         | NO   |     |         |                |
 * user_newpass_time       | binary(14)       | YES  |     | NULL    |                |
 * user_email              | tinyblob         | NO   |     |         |                |
 * user_options            | blob             | NO   |     |         |                |
 * 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    |                |

mysql> describe user;

+--+--+--+-+-++ +--+--+--+-+-++ +--+--+--+-+-++
 * Field                   | Type             | Null | Key | Default | Extra          |
 * user_id                 | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
 * user_name               | varchar(255)     | NO   | UNI |         |                |
 * user_real_name          | varchar(255)     | NO   |     |         |                |
 * user_password           | tinyblob         | NO   |     |         |                |
 * user_newpassword        | tinyblob         | NO   |     |         |                |
 * user_newpass_time       | binary(14)       | YES  |     | NULL    |                |
 * user_email              | tinytext         | NO   |     |         |                |
 * user_options            | blob             | NO   |     |         |                |
 * 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    |                |

mysql> describe user;

+--+-+--+-+---++ +--+-+--+-+---++ +--+-+--+-+---++
 * Field                   | Type            | Null | Key | Default           | Extra          |
 * user_id                 | int(5) unsigned | NO   | PRI | NULL              | auto_increment |
 * user_name               | varchar(255)    | NO   | UNI | NULL              |                |
 * user_real_name          | varchar(255)    | 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)        | NO   |     | NULL              |                |
 * user_token              | char(32)        | NO   |     | NULL              |                |
 * user_email_authenticated | char(14)       | YES  |     | NULL              |                |
 * user_email_token        | char(32)        | YES  | MUL | NULL              |                |
 * user_email_token_expires | char(14)       | YES  |     | NULL              |                |
 * user_registration       | char(14)        | YES  |     | NULL              |                |
 * user_newpass_time       | timestamp       | YES  |     | CURRENT_TIMESTAMP |                |
 * user_editcount          | int(11)         | YES  |     | NULL              |                |

mysql> describe user;

+--+-+--+-+-++ +--+-+--+-+-++ +--+-+--+-+-++
 * Field                   | Type            | Null | Key | Default | Extra          |
 * user_id                 | int(5) unsigned | NO   | PRI | NULL    | auto_increment |
 * user_name               | varchar(255)    | NO   | UNI | NULL    |                |
 * user_real_name          | varchar(255)    | 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)        | NO   |     | NULL    |                |
 * user_token              | char(32)        | NO   |     | NULL    |                |
 * user_email_authenticated | char(14)       | YES  |     | NULL    |                |
 * user_email_token        | char(32)        | YES  | MUL | NULL    |                |
 * user_email_token_expires | char(14)       | YES  |     | NULL    |                |
 * user_registration       | char(14)        | YES  |     | NULL    |                |

mysql> describe user;

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

mysql> describe user;

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