Difference between revisions of "MediaWikiDoc:User.doc"

From HypertWiki
Jump to navigation Jump to search
 
(moved to htyp some time ago)
 
Line 1: Line 1:
[[Techniques]]: Software: [[MediaWiki]]: [[MediaWikiDoc:Developer Documents|Developer Documents]]: [[MediaWikiDoc:User.doc|User.doc]]
{{to htyp}}
 
==Contents==
Documenting the Wikipedia 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:
==Edit Log==
*'''2005-06-13''' Transcribed from docs for MediaWiki version 1.4.5. Yes, the file does end there.

Latest revision as of 21:14, 7 December 2005

VYPLGO2.64pxh.png This page has been moved to HTYP, the HyperTwin Yellow Pages.