summaryrefslogtreecommitdiff
path: root/docs/user.txt
blob: 3f1c8202ef2da5e66bf1903b8bf3e0177886ed88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

user.txt

Documenting the MediaWiki User object.

(DISCLAIMER: The documentation is not guaranteed to be in sync with
the code at all times. If in doubt, check the table definitions
and User.php.)

Database fields:

  user_id
    Unique integer identifier; primary key. Sent to user in
    cookie "{$wgDBname}UserID".

  user_name
    Text of full user name; title of "user:" page.  Displayed
    on change lists, etc.  Sent to user as cookie "{$wgDBname}UserName".
    Note that user names can contain spaces, while these are
    converted to underscores in page titles.

  user_rights
    Comma-separated list of rights. Right now, only "sysop",
    "developer", "bureaucrat", and "bot" have meaning.

  user_password
    Salted md5 hash of md5-hashed user login password.  If user option to
    remember password is set, an md5 password hash is stored in cookie
    "{$wgDBname}UserPassword". The original password and the hashed password
    can be compared to the salted-hashed-hashed password.

  user_newpassword
    Hash for randomly generated password sent on 'send me a new password'.
    If a match is made on login, the new password will replace the old one.

  user_email
    User's e-mail address. (Optional, used for user-to-user
    e-mail and password recovery.)

  user_options
    A urlencoded string of name=value pairs to set various
    user options.

  user_touched
    Timestamp updated when the user logs in, changes preferences, alters
    watchlist, or when someone edits their user talk page or they clear
    the new-talk field by viewing it. Used to invalidate old cached pages
    from the user's browser cache.

  user_real_name
    "Real name" optionally used in some metadata lists.

The user object encapsulates all of the settings, and clients
classes use the getXXX() functions to access them. These functions
do all the work of determining whether the user is logged in,
whether the requested option can be satisfied from cookies or
whether a database query is needed. Most of the settings needed
for rendering normal pages are set in the cookie to minimize use
of the database.

Options
  The user_options field is a list of name-value pairs.  The
  following option names are used at various points in the system: