TEXT   56


Guest on 10th June 2021 11:11:41 PM

  2. user.txt
  4. Documenting the MediaWiki User object.
  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.)
  10. Database fields:
  12.   user_id
  13.     Unique integer identifier; primary key. Sent to user in
  14.     cookie "{$wgDBname}UserID".
  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.
  22.   user_rights
  23.     Comma-separated list of rights. Right now, only "sysop",
  24.     "developer", "bureaucrat", and "bot" have meaning.
  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.
  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.
  36.   user_email
  37.     User's e-mail address. (Optional, used for user-to-user
  38.     e-mail and password recovery.)
  40.   user_options
  41.     A urlencoded string of name=value pairs to set various
  42.     user options.
  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.
  50.   user_real_name
  51.     "Real name" optionally used in some metadata lists.
  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.
  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:

Raw Paste

Login or Register to edit or fork this paste. It's free.