Change .doc extension to .txt so people stop asking why we have Word documents. WE...
[lhc/web/wiklou.git] / docs / user.txt
1
2 USER.DOC
3
4 Documenting the Wikipedia User object.
5
6 (DISCLAIMER: The documentation is not guaranteed to be in sync with
7 the code at all times. If in doubt, check the table definitions
8 and User.php.)
9
10 Database fields:
11
12 user_id
13 Unique integer identifier; primary key. Sent to user in
14 cookie "{$wgDBname}UserID".
15
16 user_name
17 Text of full user name; title of "user:" page. Displayed
18 on change lists, etc. Sent to user as cookie "{$wgDBname}UserName".
19 Note that user names can contain spaces, while these are
20 converted to underscores in page titles.
21
22 user_rights
23 Comma-separated list of rights. Right now, only "sysop",
24 "developer", "bureaucrat", and "bot" have meaning.
25
26 user_password
27 Salted md5 hash of md5-hashed user login password. If user option to
28 remember password is set, an md5 password hash is stored in cookie
29 "{$wgDBname}UserPassword". The original password and the hashed password
30 can be compared to the salted-hashed-hashed password.
31
32 user_newpassword
33 Hash for randomly generated password sent on 'send me a new password'.
34 If a match is made on login, the new password will replace the old one.
35
36 user_email
37 User's e-mail address. (Optional, used for user-to-user
38 e-mail and password recovery.)
39
40 user_options
41 A urlencoded string of name=value pairs to set various
42 user options.
43
44 user_touched
45 Timestamp updated when the user logs in, changes preferences, alters
46 watchlist, or when someone edits their user talk page or they clear
47 the new-talk field by viewing it. Used to invalidate old cached pages
48 from the user's browser cache.
49
50 user_real_name
51 "Real name" optionally used in some metadata lists.
52
53 The user object encapsulates all of the settings, and clients
54 classes use the getXXX() functions to access them. These functions
55 do all the work of determining whether the user is logged in,
56 whether the requested option can be satisfied from cookies or
57 whether a database query is needed. Most of the settings needed
58 for rendering normal pages are set in the cookie to minimize use
59 of the database.
60
61 Options
62 The user_options field is a list of name-value pairs. The
63 following option names are used at various points in the system: