User Class Reference

The User object encapsulates all of the user-specific settings (user_id, name, rights, password, email address, options, last login time). More...

Inherited by PPFuzzUser.

List of all members.

Public Member Functions

 User ()
 Lightweight constructor for an anonymous user.
 load ()
 Load the user table data for this object from the source given by mFrom.
 loadFromId ()
 Load user table data, given mId has already been set.
 saveToCache ()
 Save user data to the shared cache.
 isValidPassword ($password)
 Is the input a valid password for this user?
 getPasswordValidity ($password)
 Given unvalidated password input, return error message on failure.
 loadDefaults ($name=false)
 Set cached properties to default.
 SetupSession ()
 loadFromRow ($row)
 Initialize this object from a row from the user table.
 clearInstanceCache ($reloadFrom=false)
 Clear various cached data stored in this object.
 isDnsBlacklisted ($ip, $checkWhitelist=false)
 Whether the given IP is in a DNS blacklist.
 inDnsBlacklist ($ip, $bases)
 Whether the given IP is in a given DNS blacklist.
 isPingLimitable ()
 Is this user subject to rate limiting?
 pingLimiter ($action= 'edit')
 Primitive rate limits: enforce maximum actions per time period to put a brake on flooding.
 isBlocked ($bFromSlave=true)
 Check if user is blocked.
 isBlockedFrom ($title, $bFromSlave=false)
 Check if user is blocked from editing a particular article.
 blockedBy ()
 If user is blocked, return the name of the user who placed the block.
 blockedFor ()
 If user is blocked, return the specified reason for the block.
 getBlockId ()
 If user is blocked, return the ID for the block.
 isBlockedGlobally ($ip= '')
 Check if user is blocked on all wikis.
 isLocked ()
 Check if user account is locked.
 isHidden ()
 Check if user account is hidden.
 getId ()
 Get the user's ID.
 setId ($v)
 Set the user and reload all fields according to a given ID.
 getName ()
 Get the user name, or the IP of an anonymous user.
 setName ($str)
 Set the user name.
 getTitleKey ()
 Get the user's name escaped by underscores.
 getNewtalk ()
 Check if the user has new messages.
 getNewMessageLinks ()
 Return the talk page(s) this user has new messages on.
 checkNewtalk ($field, $id, $fromMaster=false)
 Internal uncached check for new messages.
 updateNewtalk ($field, $id)
 Add or update the new messages flag.
 deleteNewtalk ($field, $id)
 Clear the new messages flag for the given user.
 setNewtalk ($val)
 Update the 'You have new messages!' status.
 invalidateCache ()
 Immediately touch the user data cache for this account.
 validateCache ($timestamp)
 Validate the cache for this account.
 getTouched ()
 Get the user touched timestamp.
 setPassword ($str)
 Set the password and reset the random token.
 setInternalPassword ($str)
 Set the password and reset the random token unconditionally.
 getToken ()
 Get the user's current token.
 setToken ($token=false)
 Set the random token (used for persistent authentication) Called from loadDefaults() among other places.
 setCookiePassword ($str)
 Set the cookie password.
 setNewpassword ($str, $throttle=true)
 Set the password for a password reminder or new account email.
 isPasswordReminderThrottled ()
 Has password reminder email been sent within the last $wgPasswordReminderResendTime hours?
 getEmail ()
 Get the user's e-mail address.
 getEmailAuthenticationTimestamp ()
 Get the timestamp of the user's e-mail authentication.
 setEmail ($str)
 Set the user's e-mail address.
 getRealName ()
 Get the user's real name.
 setRealName ($str)
 Set the user's real name.
 getOption ($oname, $defaultOverride=null)
 Get the user's current setting for a given option.
 getOptions ()
 Get all user's options.
 getBoolOption ($oname)
 Get the user's current setting for a given option, as a boolean value.
 getIntOption ($oname, $defaultOverride=0)
 Get the user's current setting for a given option, as a boolean value.
 setOption ($oname, $val)
 Set the given option for a user.
 resetOptions ()
 Reset all options to the site defaults.
 getDatePreference ()
 Get the user's preferred date format.
 getRights ()
 Get the permissions this user has.
 getGroups ()
 Get the list of explicit group memberships this user has.
 getEffectiveGroups ($recache=false)
 Get the list of implicit group memberships this user has.
 getEditCount ()
 Get the user's edit count.
 addGroup ($group)
 Add the user to the given group.
 removeGroup ($group)
 Remove the user from the given group.
 isLoggedIn ()
 Get whether the user is logged in.
 isAnon ()
 Get whether the user is anonymous.
 isBot ()
 Get whether the user is a bot.
 isAllowed ($action= '')
 Check if user is allowed to access a feature / make an action.
 useRCPatrol ()
 Check whether to enable recent changes patrol features for this user.
 useNPPatrol ()
 Check whether to enable new pages patrol features for this user.
getSkin ($t=null)
 Get the current skin, loading it if required, and setting a title.
 isWatched ($title)
 Check the watched status of an article.
 addWatch ($title)
 Watch an article.
 removeWatch ($title)
 Stop watching an article.
 clearNotification (&$title)
 Clear the user's notification timestamp for the given title.
 clearAllNotifications ($currentUser)
 Resets all of the given user's page-change notification timestamps.
 decodeOptions ($str)
 Set this user's options from an encoded string.
 setCookies ()
 Set the default cookies for this session on the user's client.
 logout ()
 Log this user out.
 doLogout ()
 Clear the user's cookies and session, and reset the instance cache.
 saveSettings ()
 Save this user's settings into the database.
 idForName ()
 If only this user's username is known, and it exists, return the user ID.
 addToDatabase ()
 Add this existing user object to the database.
 spreadBlock ()
 If this (non-anonymous) user is blocked, block any IP address they've successfully logged in from.
 getPageRenderingHash ()
 Generate a string which will be different for any combination of user options which would produce different parser output.
 isBlockedFromCreateAccount ()
 Get whether the user is explicitly blocked from account creation.
 isBlockedFromEmailuser ()
 Get whether the user is blocked from using Special:Emailuser.
 isAllowedToCreateAccount ()
 Get whether the user is allowed to create an account.
 setLoaded ($loaded)
 getUserPage ()
 Get this user's personal page title.
 getTalkPage ()
 Get this user's talk page title.
 isNewbie ()
 Determine whether the user is a newbie.
 checkPassword ($password)
 Check to see if the given clear-text password is one of the accepted passwords.
 checkTemporaryPassword ($plaintext)
 Check if the given clear-text password matches the temporary password sent by e-mail for password reset operations.
 editToken ($salt= '')
 Initialize (if necessary) and return a session token value which can be used in edit forms to show that the user's login credentials aren't being hijacked with a foreign form submission.
 matchEditToken ($val, $salt= '')
 Check given value against the token value stored in the session.
 matchEditTokenNoSuffix ($val, $salt= '')
 Check given value against the token value stored in the session, ignoring the suffix.
 sendConfirmationMail ()
 Generate a new e-mail confirmation token and send a confirmation/invalidation mail to the user's given address.
 sendMail ($subject, $body, $from=null, $replyto=null)
 Send an e-mail to this user's account.
 confirmationToken (&$expiration)
 Generate, store, and return a new e-mail confirmation code.
 confirmationTokenUrl ($token)
 Return a URL the user can use to confirm their email address.
 invalidationTokenUrl ($token)
 Return a URL the user can use to invalidate their email address.
 confirmEmail ()
 Mark the e-mail address confirmed.
 invalidateEmail ()
 Invalidate the user's e-mail confirmation, and unauthenticate the e-mail address if it was already confirmed.
 setEmailAuthenticationTimestamp ($timestamp)
 Set the e-mail authentication timestamp.
 canSendEmail ()
 Is this user allowed to send e-mails within limits of current site configuration?
 canReceiveEmail ()
 Is this user allowed to receive e-mails within limits of current site configuration?
 isEmailConfirmed ()
 Is this user's e-mail address valid-looking and confirmed within limits of the current site configuration?
 isEmailConfirmationPending ()
 Check whether there is an outstanding request for e-mail confirmation.
 getRegistration ()
 Get the timestamp of account creation.
 getFirstEditTimestamp ()
 Get the timestamp of the first edit.
 changeableGroups ()
 Returns an array of groups that this user can add and remove.
 incEditCount ()
 Increment the user's edit-count field.
 addNewUserLogEntry ($byEmail=false)
 Add a newuser log entry for this user.
 addNewUserLogEntryAutoCreate ()
 Add an autocreate newuser log entry for this user Used by things like CentralAuth and perhaps other authplugins.

Static Public Member Functions

static whoIs ($id)
 Get the username corresponding to a given user ID.
static whoIsReal ($id)
 Get the real name of a user given their user ID.
static idFromName ($name)
 Get database id given a user name.
static isIP ($name)
 Does the string match an anonymous IPv4 address?
static isValidUserName ($name)
 Is the input a valid username?
static isUsableName ($name)
 Usernames which fail to pass this function will be blocked from user login and new account registrations, but may be used internally by batch processes.
static isCreatableName ($name)
 Usernames which fail to pass this function will be blocked from new account registrations, but may be used internally either by batch processes or by user accounts which have already been created.
static isValidEmailAddr ($addr)
 Does a string look like an e-mail address?
static getCanonicalName ($name, $validate= 'valid')
 Given unvalidated user input, return a canonical username, or false if the username is invalid.
static edits ($uid)
 Count the number of edits of a user.
static randomPassword ()
 Return a random password.
static getDefaultOptions ()
 Combine the language default options with any site-specific options and add the default language variants.
static getDefaultOption ($opt)
 Get a given default option value.
static getToggles ()
 Get a list of user toggle names.
static createNew ($name, $params=array())
 Add a user to the database, return the user object.
 getMaxID ()
 Get the maximum valid user ID.
static generateToken ($salt= '')
 Generate a looking random token for various uses.
static getGroupPermissions ($groups)
 Get the permissions associated with a given list of groups.
static getGroupsWithPermission ($role)
 Get all the groups who have a given permission.
static getGroupName ($group)
 Get the localized descriptive name for a group, if it exists.
static getGroupMember ($group)
 Get the localized descriptive name for a member of a group, if it exists.
static getAllGroups ()
 Return the set of defined explicit groups.
static getAllRights ()
 Get a list of all available permissions.
static getImplicitGroups ()
 Get a list of implicit groups.
static getGroupPage ($group)
 Get the title of a page describing a particular group.
static makeGroupLinkHTML ($group, $text= '')
 Create a link to the group in HTML, if available; else return the group name.
static makeGroupLinkWiki ($group, $text= '')
 Create a link to the group in Wikitext, if available; else return the group name.
static changeableByGroup ($group)
 Returns an array of the groups that a particular group can add/remove.
static getRightDescription ($right)
 Get the description of a given right.
static oldCrypt ($password, $userId)
 Make an old-style password hash.
static crypt ($password, $salt=false)
 Make a new-style password hash.
static comparePasswords ($hash, $password, $userId=false)
 Compare a password hash with a plain-text password.
static passwordChangeInputAttribs ()
 Provide an array of HTML5 attributes to put on an input element intended for the user to enter a new password.
newFrom*() static factory methods
static newFromName ($name, $validate= 'valid')
 Static factory method for creation from username.
static newFromId ($id)
 Static factory method for creation from a given user ID.
static newFromConfirmationCode ($code)
 Factory method to fetch whichever user has a given email confirmation code.
static newFromSession ()
 Create a new user object using data from session or cookies.
static newFromRow ($row)
 Create a new user object from a user row.

Public Attributes

 $mDataLoaded
  Boolean : Whether the cache variables have been loaded.
 $mAuthLoaded
 $mOptionsLoaded
 $mFrom
  String : Initialization data source if mDataLoaded==false.
Cache variables
 $mId
 $mName
 $mRealName
 $mPassword
 $mNewpassword
 $mNewpassTime
 $mEmail
 $mTouched
 $mToken
 $mEmailAuthenticated
 $mEmailToken
 $mEmailTokenExpires
 $mRegistration
 $mGroups
 $mOptionOverrides
Lazy-initialized variables, invalidated with clearInstanceCache
 $mNewtalk
 $mDatePreference
 $mBlockedby
 $mHash
 $mSkin
 $mRights
 $mBlockreason
 $mBlock
 $mEffectiveGroups
 $mBlockedGlobally
 $mLocked
 $mHideName
 $mOptions

Static Public Attributes

static $mToggles
  { String :} : A list of default user toggles, i.e., boolean user preferences that are displayed by Special:Preferences as checkboxes.
static $mCacheVars
  { String :} : List of member variables which are saved to the shared cache (memcached).
static $mCoreRights
  { String :} : Core rights.
static $mAllRights = false
  String : Cached results of getAllRights()
static $idCacheByName = array()

Protected Member Functions

 setCookie ($name, $value, $exp=0)
 Set a cookie on the user's client.
 clearCookie ($name)
 Clear a cookie on the user's client.
 getTokenUrl ($page, $token)
 Internal function to format the e-mail validation/invalidation URLs.
 loadOptions ()
 saveOptions ()

Private Member Functions

 loadFromSession ()
 Load user data from the session or login cookie.
 loadFromDatabase ()
 Load user and user_group data from the database.
 loadGroups ()
 Load the groups from the database if they aren't already loaded.
 getBlockedStatus ($bFromSlave=true)
 Get blocking information.
 clearSharedCache ()
 Clear user data from memcached.

Static Private Member Functions

static newTouchedTimestamp ()
 Generate a current or new-future timestamp to be stored in the user_touched field when we update things.


Detailed Description

The User object encapsulates all of the user-specific settings (user_id, name, rights, password, email address, options, last login time).

Client classes use the getXXX() functions to access these fields. 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.

Definition at line 43 of file User.php.


Member Function Documentation

User::addGroup ( group  ) 

Add the user to the given group.

This takes immediate effect.

Parameters:
$group  String : Name of the group to add

Definition at line 2145 of file User.php.

References $dbw, getEffectiveGroups(), getGroupPermissions(), getId(), invalidateCache(), loadGroups(), and wfGetDB().

User::addNewUserLogEntry ( byEmail = false  ) 

Add a newuser log entry for this user.

Parameters:
$byEmail Boolean: account made by email?

Definition at line 3573 of file User.php.

References $action, $wgNewUserLog, $wgUser, getId(), getName(), getUserPage(), and wfMsgForContent().

User::addNewUserLogEntryAutoCreate (  ) 

Add an autocreate newuser log entry for this user Used by things like CentralAuth and perhaps other authplugins.

Definition at line 3602 of file User.php.

References $wgNewUserLog, getId(), and getUserPage().

User::addToDatabase (  ) 

Add this existing user object to the database.

Definition at line 2613 of file User.php.

References $dbw, clearInstanceCache(), load(), saveOptions(), and wfGetDB().

User::addWatch ( title  ) 

Watch an article.

Parameters:
$title {Title} Title of the article to look at

Definition at line 2298 of file User.php.

References $title, WatchedItem::fromUserTitle(), and invalidateCache().

User::blockedBy (  ) 

If user is blocked, return the name of the user who placed the block.

Returns:
name of blocker

Definition at line 1414 of file User.php.

References getBlockedStatus().

User::blockedFor (  ) 

If user is blocked, return the specified reason for the block.

Returns:
Blocking reason

Definition at line 1423 of file User.php.

References getBlockedStatus().

User::canReceiveEmail (  ) 

Is this user allowed to receive e-mails within limits of current site configuration?

Returns:
Boolean : True if allowed

Definition at line 3075 of file User.php.

References getOption(), and isEmailConfirmed().

User::canSendEmail (  ) 

Is this user allowed to send e-mails within limits of current site configuration?

Returns:
Boolean : True if allowed

Definition at line 3060 of file User.php.

References $wgEnableEmail, $wgEnableUserEmail, isAllowed(), isEmailConfirmed(), and wfRunHooks().

static User::changeableByGroup ( group  )  [static]

Returns an array of the groups that a particular group can add/remove.

Parameters:
$group String: the group to check for whether it can add/remove
Returns:
Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ), 'add-self' => array( addablegroups to self), 'remove-self' => array( removable groups from self) )

Definition at line 3336 of file User.php.

References $wgAddGroups, $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf, $wgRemoveGroups, and getAllGroups().

Referenced by changeableGroups().

User::changeableGroups (  ) 

Returns an array of groups that this user can add and remove.

Returns:
Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ), 'add-self' => array( addablegroups to self), 'remove-self' => array( removable groups from self) )

Definition at line 3400 of file User.php.

References changeableByGroup(), getAllGroups(), getEffectiveGroups(), and isAllowed().

User::checkNewtalk ( field,
id,
fromMaster = false 
)

Internal uncached check for new messages.

See also:
getNewtalk()
Parameters:
$field  String : 'user_ip' for anonymous users, 'user_id' otherwise
$id  String : or Integer : : User's IP address for anonymous users, User ID otherwise
$fromMaster  Boolean : true to fetch from the master, false for a slave
Returns:
Boolean : True if the user has new messages
Access:
private

Definition at line 1622 of file User.php.

References $ok, and wfGetDB().

Referenced by getNewtalk().

User::checkPassword ( password  ) 

Check to see if the given clear-text password is one of the accepted passwords.

Parameters:
$password  String : user password.
Returns:
Boolean : True if the given password is correct, otherwise False.

Definition at line 2788 of file User.php.

References $wgAuth, isValidPassword(), and load().

User::checkTemporaryPassword ( plaintext  ) 

Check if the given clear-text password matches the temporary password sent by e-mail for password reset operations.

Returns:
Boolean : True if matches, false otherwise

Definition at line 2828 of file User.php.

References $wgNewPasswordExpiry, getId(), load(), and wfTimestamp().

User::clearAllNotifications ( currentUser  ) 

Resets all of the given user's page-change notification timestamps.

If e-notif e-mails are on, they will receive notification mails on the next change of any watched page.

Parameters:
$currentUser  Integer : User ID

Definition at line 2381 of file User.php.

References $dbw, $wgShowUpdatedMarker, setNewtalk(), and wfGetDB().

User::clearCookie ( name  )  [protected]

Clear a cookie on the user's client.

Parameters:
$name  String : Name of the cookie to clear

Definition at line 2441 of file User.php.

References $name, and setCookie().

Referenced by doLogout(), and setCookies().

User::clearInstanceCache ( reloadFrom = false  ) 

Clear various cached data stored in this object.

Parameters:
$reloadFrom Reload user and user_groups table data from a given source. May be "name", "id", "defaults", "session", or false for no reload.

Definition at line 1024 of file User.php.

Referenced by addToDatabase(), doLogout(), setId(), and User().

User::clearNotification ( &$  title  ) 

Clear the user's notification timestamp for the given title.

If e-notif e-mails are on, they will receive notification mails on the next change of the page if it's watched etc.

Parameters:
$title {Title} Title of the article to look at

Definition at line 2320 of file User.php.

References $dbw, $title, $wgShowUpdatedMarker, $wgUser, getId(), getName(), isAnon(), setNewtalk(), wfGetDB(), wfReadOnly(), and wfRunHooks().

User::clearSharedCache (  )  [private]

Clear user data from memcached.

Use after applying fun updates to the database; caller's responsibility to update user_touched if appropriate.

Called implicitly from invalidateCache() and saveSettings().

Definition at line 1731 of file User.php.

References $wgMemc, load(), and wfMemcKey().

Referenced by invalidateCache(), and saveSettings().

static User::comparePasswords ( hash,
password,
userId = false 
) [static]

Compare a password hash with a plain-text password.

Requires the user ID if there's a chance that the hash is an old-style hash.

Parameters:
$hash  String : Password hash
$password  String : Plain-text password to compare
$userId  String : User ID for old-style password salt
Returns:
Boolean :

Definition at line 3547 of file User.php.

References $result, oldCrypt(), and wfRunHooks().

Referenced by ExternalUser_MediaWiki::authenticate().

User::confirmationToken ( &$  expiration  ) 

Generate, store, and return a new e-mail confirmation code.

A hash (unsalted, since it's used as a key) is stored.

Note:
Call saveSettings() after calling this function to commit this change to the database.
Parameters:
[out] &$expiration  Mixed : Accepts the expiration time
Returns:
String : New token
Access:
private

Definition at line 2964 of file User.php.

References generateToken(), load(), and wfTimestamp().

Referenced by sendConfirmationMail().

User::confirmationTokenUrl ( token  ) 

Return a URL the user can use to confirm their email address.

Parameters:
$token  String : Accepts the email confirmation token
Returns:
String : New token URL
Access:
private

Definition at line 2982 of file User.php.

References getTokenUrl().

Referenced by sendConfirmationMail().

User::confirmEmail (  ) 

Mark the e-mail address confirmed.

Note:
Call saveSettings() after calling this function to commit the change.

Definition at line 3024 of file User.php.

References setEmailAuthenticationTimestamp(), wfRunHooks(), and wfTimestampNow().

static User::createNew ( name,
params = array() 
) [static]

Add a user to the database, return the user object.

Parameters:
$name  String : Username to add
$params  { String :} : Non-default parameters to save to the database:
  • password The user's password. Password logins will be disabled if this is omitted.
  • newpassword A temporary password mailed to the user
  • email The user's email address
  • email_authenticated The email authentication timestamp
  • real_name The user's real name
  • options An associative array of non-default options
  • token Random authentication token. Do not set.
  • registration Registration timestamp. Do not set.
Returns:
User : A new User object, or null if the username already exists

Definition at line 2575 of file User.php.

References $dbw, $name, newFromId(), and wfGetDB().

Referenced by ApiSetup::setupUser().

static User::crypt ( password,
salt = false 
) [static]

Make a new-style password hash.

Parameters:
$password  String : Plain-text password
$salt  String : Optional salt, may be random or the user ID. If unspecified or false, will generate one automatically
Returns:
String : Password hash

Definition at line 3520 of file User.php.

References $wgPasswordSalt, wfGenerateToken(), and wfRunHooks().

Referenced by setInternalPassword(), and setNewpassword().

User::decodeOptions ( str  ) 

Set this user's options from an encoded string.

Parameters:
$str  String : Encoded options to import
Access:
private

Definition at line 2406 of file User.php.

References $s.

Referenced by loadFromRow().

User::deleteNewtalk ( field,
id 
)

Clear the new messages flag for the given user.

Parameters:
$field  String : 'user_ip' for anonymous users, 'user_id' otherwise
$id  String : or Integer : : User's IP address for anonymous users, User ID otherwise
Returns:
Boolean : True if successful, false otherwise
Access:
private

Definition at line 1662 of file User.php.

References $dbw, wfDebug(), and wfGetDB().

Referenced by setNewtalk().

User::doLogout (  ) 

Clear the user's cookies and session, and reset the instance cache.

Access:
private
See also:
logout()

Definition at line 2494 of file User.php.

References clearCookie(), clearInstanceCache(), setCookie(), and wfTimestampNow().

Referenced by logout().

static User::edits ( uid  )  [static]

Count the number of edits of a user.

Todo:
It should not be static and some day should be merged as proper member function / deprecated -- domas
Parameters:
$uid User ID to check
Returns:
The user's edit count

Definition at line 749 of file User.php.

References $dbr, $dbw, wfGetDB(), wfProfileIn(), and wfProfileOut().

Referenced by getEditCount(), and Linker::userToolLinks().

User::editToken ( salt = ''  ) 

Initialize (if necessary) and return a session token value which can be used in edit forms to show that the user's login credentials aren't being hijacked with a foreign form submission.

Parameters:
$salt  String : or { String :} : Optional function-specific data for hashing
Returns:
String : The new edit token

Definition at line 2848 of file User.php.

References generateToken(), and isAnon().

Referenced by matchEditToken(), and matchEditTokenNoSuffix().

static User::generateToken ( salt = ''  )  [static]

Generate a looking random token for various uses.

Parameters:
$salt  String : Optional salt value
Returns:
String : The new random token

Definition at line 2871 of file User.php.

Referenced by confirmationToken(), editToken(), LoginForm::setCreateaccountToken(), and LoginForm::setLoginToken().

static User::getAllGroups (  )  [static]

Return the set of defined explicit groups.

The implicit groups (by default *, 'user' and 'autoconfirmed') are not included, as they are defined automatically, not in the database.

Returns:
{ String :} : Array of internal group names

Definition at line 3230 of file User.php.

References $wgGroupPermissions, and $wgRevokePermissions.

Referenced by UsersPager::__construct(), changeableByGroup(), changeableGroups(), ApiQueryAllUsers::execute(), UsersPager::getAllGroups(), ApiUserrights::getAllowedParams(), and ApiQueryAllUsers::getAllowedParams().

static User::getAllRights (  )  [static]

Get a list of all available permissions.

Returns:
{ String :} : Array of permission names

Definition at line 3242 of file User.php.

References $wgAvailableRights, and wfRunHooks().

User::getBlockedStatus ( bFromSlave = true  )  [private]

Get blocking information.

Parameters:
$bFromSlave Whether to check the slave database first. To improve performance, non-critical checks are done against slaves. Check when actually saving should be done against master.

Definition at line 1108 of file User.php.

References $wgProxyWhitelist, $wgUser, getName(), isAllowed(), isDnsBlacklisted(), isIP(), isLoggedIn(), load(), spreadBlock(), wfDebug(), wfGetIP(), wfIsLocallyBlockedProxy(), wfMsg(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by blockedBy(), blockedFor(), getBlockId(), isBlocked(), isBlockedFromCreateAccount(), isBlockedFromEmailuser(), and isHidden().

User::getBlockId (  ) 

If user is blocked, return the ID for the block.

Returns:
Block ID

Definition at line 1432 of file User.php.

References getBlockedStatus().

User::getBoolOption ( oname  ) 

Get the user's current setting for a given option, as a boolean value.

Parameters:
$oname  String : The option to check
Returns:
Boolean : User's current value for the option
See also:
getOption()

Definition at line 2001 of file User.php.

References getOption().

static User::getCanonicalName ( name,
validate = 'valid' 
) [static]

Given unvalidated user input, return a canonical username, or false if the username is invalid.

Parameters:
$name  String : User input
$validate  String : or Boolean : : Type of validation to use:
  • false No validation
  • 'valid' Valid for batch processes
  • 'usable' Valid for batch processes and login
  • 'creatable' Valid for batch processes, login and account creation

Definition at line 694 of file User.php.

References $name, $t, $wgAuth, $wgContLang, isCreatableName(), isUsableName(), isValidUserName(), Title::makeTitle(), and Title::newFromText().

Referenced by RollbackEdits::execute(), ApiRollback::execute(), ApiQueryUsers::execute(), UserrightsPage::fetchUser(), ExternalUser_MediaWiki::initFromName(), newFromName(), ApiQueryContributions::prepareUsername(), and ApiQueryBlocks::prepareUsername().

User::getDatePreference (  ) 

Get the user's preferred date format.

Returns:
String : User's preferred date format

Definition at line 2057 of file User.php.

References $wgLang, and getOption().

Referenced by getPageRenderingHash().

static User::getDefaultOption ( opt  )  [static]

Get a given default option value.

Parameters:
$opt Name of option to retrieve
Returns:
Default option value

Definition at line 1074 of file User.php.

References getDefaultOptions().

Referenced by CoreParserFunctions::gender(), Linker::makeImageLink2(), and ImagePage::openShowImage().

static User::getDefaultOptions (  )  [static]

Combine the language default options with any site-specific options and add the default language variants.

Returns:
{{}} Array of options

Definition at line 1046 of file User.php.

References $wgContLang, $wgDefaultSkin, $wgDefaultUserOptions, $wgNamespacesToBeSearchedDefault, and SearchEngine::searchableNamespaces().

Referenced by Language::dateFormat(), getDefaultOption(), userOptions::getDefaultOptionsNames(), Language::getDefaultUserOptions(), getOption(), Preferences::getPreferences(), userOptions::LISTER(), loadOptions(), resetOptions(), and userOptions::USAGER().

User::getEditCount (  ) 

Get the user's edit count.

Returns:
Integer : User'e edit count

Definition at line 2127 of file User.php.

References edits(), and getId().

Referenced by Autopromote::checkCondition(), and loadFromDatabase().

User::getEffectiveGroups ( recache = false  ) 

Get the list of implicit group memberships this user has.

This includes all explicit groups, plus 'user' if logged in, '*' for all accounts and autopromoted groups

Parameters:
$recache  Boolean : Whether to avoid the cache
Returns:
{ String :} : Array of internal group names

Definition at line 2102 of file User.php.

References Autopromote::getAutopromoteGroups(), getGroups(), getId(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by addGroup(), changeableGroups(), getRights(), isPingLimitable(), and removeGroup().

User::getEmail (  ) 

Get the user's e-mail address.

Returns:
String : User's email address

Definition at line 1914 of file User.php.

References load(), and wfRunHooks().

Referenced by Autopromote::checkCondition().

User::getEmailAuthenticationTimestamp (  ) 

Get the timestamp of the user's e-mail authentication.

Returns:
String : TS_MW timestamp

Definition at line 1924 of file User.php.

References load(), and wfRunHooks().

Referenced by Autopromote::checkCondition(), and isEmailConfirmed().

User::getFirstEditTimestamp (  ) 

Get the timestamp of the first edit.

Returns:
String : or Boolean : : string Timestamp of first edit, or false for non-existent/anonymous user accounts.

Definition at line 3136 of file User.php.

References $dbr, getId(), wfGetDB(), and wfTimestamp().

Referenced by Autopromote::checkCondition().

static User::getGroupMember ( group  )  [static]

Get the localized descriptive name for a member of a group, if it exists.

Parameters:
$group  String : Internal group name
Returns:
String : Localized name for group member

Definition at line 3214 of file User.php.

References $name, $wgMessageCache, wfEmptyMsg(), and wfMsg().

Referenced by UsersPager::buildGroupLink(), UserrightsPage::groupCheckboxes(), and Preferences::profilePreferences().

static User::getGroupName ( group  )  [static]

Get the localized descriptive name for a group, if it exists.

Parameters:
$group  String : Internal group name
Returns:
String : Localized descriptive group name

Definition at line 3198 of file User.php.

References $name, $wgMessageCache, wfEmptyMsg(), and wfMsg().

Referenced by UserrightsPage::buildGroupLink(), UsersPager::getAllGroups(), makeGroupLinkHTML(), makeGroupLinkWiki(), and Preferences::profilePreferences().

static User::getGroupPage ( group  )  [static]

Get the title of a page describing a particular group.

Parameters:
$group  String : Internal group name
Returns:
Title : or Boolean : : Title of the page if it exists, false otherwise

Definition at line 3272 of file User.php.

References $page, $title, $wgMessageCache, Title::newFromText(), wfEmptyMsg(), and wfMsgForContent().

Referenced by makeGroupLinkHTML(), and makeGroupLinkWiki().

static User::getGroupPermissions ( groups  )  [static]

Get the permissions associated with a given list of groups.

Parameters:
$groups  { String :} : List of internal group names
Returns:
{ String :} : List of permission key names for given groups combined

Definition at line 3154 of file User.php.

References $wgGroupPermissions, and $wgRevokePermissions.

Referenced by addGroup(), ApiMain::executeAction(), getRights(), removeGroup(), ApiMain::setCacheMode(), and wfThumbMain().

User::getGroups (  ) 

Get the list of explicit group memberships this user has.

The implicit * and user groups are not included.

Returns:
{ String :} : Array of internal group names

Definition at line 2090 of file User.php.

References load().

Referenced by Autopromote::checkCondition(), getEffectiveGroups(), and pingLimiter().

static User::getGroupsWithPermission ( role  )  [static]

Get all the groups who have a given permission.

Parameters:
$role  String : Role to check
Returns:
{ String :} : List of internal group names with the given permission

Definition at line 3181 of file User.php.

References $wgGroupPermissions.

Referenced by Title::getUserPermissionsErrorsInternal(), OutputPage::permissionRequired(), ApiMain::reallyMakeHelpMsg(), and wfSpecialNewimages().

User::getId (  ) 

Get the user's ID.

Returns:
The user's ID; 0 if the user is anonymous or nonexistent

Definition at line 1498 of file User.php.

References isIP(), and load().

Referenced by addGroup(), addNewUserLogEntry(), addNewUserLogEntryAutoCreate(), checkTemporaryPassword(), clearNotification(), getEditCount(), getEffectiveGroups(), getFirstEditTimestamp(), getRegistration(), incEditCount(), loadOptions(), pingLimiter(), saveOptions(), and setNewtalk().

static User::getImplicitGroups (  )  [static]

Get a list of implicit groups.

Returns:
{ String :} : Array of internal group names

Definition at line 3259 of file User.php.

References $wgImplicitGroups, and wfRunHooks().

User::getIntOption ( oname,
defaultOverride = 0 
)

Get the user's current setting for a given option, as a boolean value.

Parameters:
$oname  String : The option to check
$defaultOverride  Integer : A default value returned if the option does not exist
Returns:
Integer : User's current value for the option
See also:
getOption()

Definition at line 2014 of file User.php.

References getOption().

User::getMaxID (  )  [static]

Get the maximum valid user ID.

Returns:
Integer : User ID

Definition at line 2763 of file User.php.

References $dbr, $res, and wfGetDB().

User::getName (  ) 

Get the user name, or the IP of an anonymous user.

Returns:
String : User's name or IP address

Definition at line 1523 of file User.php.

References load(), IP::sanitizeIP(), and wfGetIP().

Referenced by addNewUserLogEntry(), clearNotification(), getBlockedStatus(), getNewtalk(), getTitleKey(), getUserPage(), idForName(), isBlockedFrom(), isBlockedGlobally(), Credits::link(), RdfMetaData::person(), pingLimiter(), sendConfirmationMail(), setCookies(), and setNewtalk().

User::getNewMessageLinks (  ) 

Return the talk page(s) this user has new messages on.

Returns:
{ String :} : Array of page URLs

Definition at line 1600 of file User.php.

References getNewtalk(), getUserPage(), wfRunHooks(), and wfWikiID().

User::getNewtalk (  ) 

Check if the user has new messages.

Returns:
Boolean : True if the user has new messages

Definition at line 1567 of file User.php.

References $wgMemc, checkNewtalk(), getName(), load(), and wfMemcKey().

Referenced by getNewMessageLinks().

User::getOption ( oname,
defaultOverride = null 
)

Get the user's current setting for a given option.

Parameters:
$oname  String : The option to check
$defaultOverride  String : A default value returned if the option does not exist
Returns:
String : User's current value for the option
See also:
getBoolOption()

getIntOption()

Reimplemented in PPFuzzUser.

Definition at line 1967 of file User.php.

References getDefaultOptions(), and loadOptions().

Referenced by canReceiveEmail(), getBoolOption(), getDatePreference(), getIntOption(), getPageRenderingHash(), getSkin(), and setCookies().

User::getOptions (  ) 

Get all user's options.

Returns:
array

Definition at line 1989 of file User.php.

References loadOptions().

User::getPageRenderingHash (  ) 

Generate a string which will be different for any combination of user options which would produce different parser output.

This will be used as part of the hash key for the parser cache, so users with the same options can share the same cached data safely.

Extensions which require it should install 'PageRenderingHash' hook, which will give them a chance to modify this key based on their own settings.

Returns:
String : Page rendering hash

Definition at line 2673 of file User.php.

References $wgContLang, $wgLang, $wgRenderHashAppend, $wgUseDynamicDates, getDatePreference(), getOption(), and wfRunHooks().

User::getPasswordValidity ( password  ) 

Given unvalidated password input, return error message on failure.

Parameters:
$password String Desired password
Returns:
mixed: true on success, string of error message on failure

Definition at line 636 of file User.php.

References $result, $wgContLang, $wgMinimalPasswordLength, and wfRunHooks().

Referenced by isValidPassword(), and setPassword().

User::getRealName (  ) 

Get the user's real name.

Returns:
String : User's real name

Definition at line 1944 of file User.php.

References load().

Referenced by Credits::link(), RdfMetaData::person(), and Credits::userLink().

User::getRegistration (  ) 

Get the timestamp of account creation.

Returns:
String : or Boolean : : string Timestamp of account creation, or false for non-existent/anonymous user accounts.

Definition at line 3124 of file User.php.

References getId().

Referenced by Autopromote::checkCondition().

static User::getRightDescription ( right  )  [static]

Get the description of a given right.

Parameters:
$right  String : Right to query
Returns:
String : Localized description of the right

Definition at line 3486 of file User.php.

References $name, $wgMessageCache, wfEmptyMsg(), and wfMsg().

Referenced by SpecialListGroupRights::formatPermissions().

User::getRights (  ) 

Get the permissions this user has.

Returns:
{ String :} : Array of permission names

Definition at line 2075 of file User.php.

References getEffectiveGroups(), getGroupPermissions(), and wfRunHooks().

Referenced by isAllowed().

& User::getSkin ( t = null  ) 

Get the current skin, loading it if required, and setting a title.

Parameters:
$t Title: the title to use in the skin
Returns:
Skin The current skin
Todo:
FIXME : need to check the old failback system [AV]

Definition at line 2255 of file User.php.

References $t, $wgDefaultSkin, $wgHiddenPrefs, $wgOut, $wgRequest, getOption(), Skin::newFromKey(), wfProfileIn(), and wfProfileOut().

User::getTalkPage (  ) 

Get this user's talk page title.

Returns:
Title : User's talk page title

Definition at line 2753 of file User.php.

References $title, and getUserPage().

User::getTitleKey (  ) 

Get the user's name escaped by underscores.

Returns:
String : Username escaped by underscores.

Definition at line 1559 of file User.php.

References getName().

static User::getToggles (  )  [static]

Get a list of user toggle names.

Returns:
{{}} Array of user toggle names

Definition at line 1087 of file User.php.

References $wgContLang, $wgUseRCPatrol, and wfRunHooks().

User::getToken (  ) 

Get the user's current token.

Returns:
String : Token

Definition at line 1841 of file User.php.

References load().

User::getTokenUrl ( page,
token 
) [protected]

Internal function to format the e-mail validation/invalidation URLs.

This uses $wgArticlePath directly as a quickie hack to use the hardcoded English names of the Special: pages, for ASCII safety.

Note:
Since these URLs get dropped directly into emails, using the short English names avoids insanely long URL-encoded links, which also sometimes can get corrupted in some browsers/mailers (bug 6957 with Gmail and Internet Explorer).
Parameters:
$page  String : Special page
$token  String : Token
Returns:
String : Formatted URL

Definition at line 3010 of file User.php.

References $wgArticlePath, and wfExpandUrl().

Referenced by confirmationTokenUrl(), and invalidationTokenUrl().

User::getTouched (  ) 

Get the user touched timestamp.

Definition at line 1774 of file User.php.

References load().

User::getUserPage (  ) 

Get this user's personal page title.

Returns:
Title : User's personal page title

Definition at line 2744 of file User.php.

References getName(), and Title::makeTitle().

Referenced by addNewUserLogEntry(), addNewUserLogEntryAutoCreate(), getNewMessageLinks(), getTalkPage(), Credits::link(), RdfMetaData::person(), and saveSettings().

User::idForName (  ) 

If only this user's username is known, and it exists, return the user ID.

Definition at line 2547 of file User.php.

References $dbr, $s, getName(), and wfGetDB().

static User::idFromName ( name  )  [static]

Get database id given a user name.

Parameters:
$name  String : Username
Returns:
Integer : or Null : : The corresponding user's ID, or null if user is nonexistent

Definition at line 458 of file User.php.

References $dbr, $name, $result, $s, Title::makeTitleSafe(), and wfGetDB().

Referenced by bottomLinks(), SkinTemplate::buildNavUrls(), DeletedContributionsPage::execute(), SpecialContributions::execute(), ApiQueryLogEvents::execute(), UsersPager::getQueryInfo(), LogPage::getTitleLink(), WikiRevision::importLogItem(), LogPager::limitUser(), load(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

User::incEditCount (  ) 

Increment the user's edit-count field.

Will have no effect for anonymous users.

Definition at line 3440 of file User.php.

References $dbr, $dbw, getId(), invalidateCache(), isAnon(), and wfGetDB().

User::inDnsBlacklist ( ip,
bases 
)

Whether the given IP is in a given DNS blacklist.

Parameters:
$ip IP to check
$bases or Array of Strings: URL of the DNS blacklist
Returns:
True if blacklisted.

Definition at line 1221 of file User.php.

References IP::isIPv4(), wfDebug(), wfProfileIn(), and wfProfileOut().

Referenced by isDnsBlacklisted().

User::invalidateCache (  ) 

Immediately touch the user data cache for this account.

Updates user_touched field, and removes account data from memcached for reload on the next hit.

Definition at line 1744 of file User.php.

References $dbw, clearSharedCache(), load(), newTouchedTimestamp(), wfGetDB(), and wfReadOnly().

Referenced by addGroup(), addWatch(), incEditCount(), removeGroup(), removeWatch(), and setNewtalk().

User::invalidateEmail (  ) 

Invalidate the user's e-mail confirmation, and unauthenticate the e-mail address if it was already confirmed.

Note:
Call saveSettings() after calling this function to commit the change.

Definition at line 3036 of file User.php.

References load(), setEmailAuthenticationTimestamp(), and wfRunHooks().

User::invalidationTokenUrl ( token  ) 

Return a URL the user can use to invalidate their email address.

Parameters:
$token  String : Accepts the email confirmation token
Returns:
String : New token URL
Access:
private

Definition at line 2992 of file User.php.

References getTokenUrl().

Referenced by sendConfirmationMail().

User::isAllowed ( action = ''  ) 

Check if user is allowed to access a feature / make an action.

Parameters:
$action  String : action to be checked
Returns:
Boolean : True if action is allowed, else false

Definition at line 2217 of file User.php.

References $action, $wgUseNPPatrol, $wgUseRCPatrol, and getRights().

Referenced by canSendEmail(), changeableGroups(), getBlockedStatus(), isAllowedToCreateAccount(), isBot(), isNewbie(), isPingLimitable(), useNPPatrol(), and useRCPatrol().

User::isAllowedToCreateAccount (  ) 

Get whether the user is allowed to create an account.

Returns:
Boolean : True if allowed

Definition at line 2728 of file User.php.

References isAllowed(), and isBlockedFromCreateAccount().

User::isAnon (  ) 

Get whether the user is anonymous.

Returns:
Boolean : True or false

Definition at line 2198 of file User.php.

References isLoggedIn().

Referenced by clearNotification(), editToken(), incEditCount(), isEmailConfirmed(), Credits::link(), RdfMetaData::person(), saveToCache(), setNewtalk(), and Credits::userLink().

User::isBlocked ( bFromSlave = true  ) 

Check if user is blocked.

Parameters:
$bFromSlave  Boolean : Whether to check the slave database instead of the master
Returns:
Boolean : True if blocked, false otherwise

Definition at line 1376 of file User.php.

References getBlockedStatus(), and wfDebug().

Referenced by Autopromote::checkCondition(), isBlockedFrom(), and loadFromSession().

User::isBlockedFrom ( title,
bFromSlave = false 
)

Check if user is blocked from editing a particular article.

Parameters:
$title  String : Title to check
$bFromSlave  Boolean : Whether to check the slave database instead of the master
Returns:
Boolean : True if blocked, false otherwise

Definition at line 1389 of file User.php.

References $title, $wgBlockAllowsUTEdit, getName(), isBlocked(), wfDebug(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

User::isBlockedFromCreateAccount (  ) 

Get whether the user is explicitly blocked from account creation.

Returns:
Boolean : True if blocked

Definition at line 2710 of file User.php.

References getBlockedStatus().

Referenced by isAllowedToCreateAccount().

User::isBlockedFromEmailuser (  ) 

Get whether the user is blocked from using Special:Emailuser.

Returns:
Boolean : True if blocked

Definition at line 2719 of file User.php.

References getBlockedStatus().

User::isBlockedGlobally ( ip = ''  ) 

Check if user is blocked on all wikis.

Do not use for actual edit permission checks! This is intented for quick UI checks.

Parameters:
$ip {} IP address, uses current client if none given
Returns:
{} True if blocked, false otherwise

Definition at line 1445 of file User.php.

References getName(), IP::isIPAddress(), wfGetIP(), and wfRunHooks().

User::isBot (  ) 

Get whether the user is a bot.

Returns:
Boolean : True or false
Deprecated:

Definition at line 2207 of file User.php.

References isAllowed(), and wfDeprecated().

static User::isCreatableName ( name  )  [static]

Usernames which fail to pass this function will be blocked from new account registrations, but may be used internally either by batch processes or by user accounts which have already been created.

Additional character blacklisting may be added here rather than in isValidUserName() to avoid disrupting existing accounts.

Parameters:
$name  String : String to match
Returns:
Boolean : True or false

Definition at line 610 of file User.php.

References $name, $wgInvalidUsernameCharacters, and isUsableName().

Referenced by getCanonicalName().

User::isDnsBlacklisted ( ip,
checkWhitelist = false 
)

Whether the given IP is in a DNS blacklist.

Parameters:
$ip IP to check
$checkWhitelist Boolean: whether to check the whitelist first
Returns:
True if blacklisted.

Definition at line 1200 of file User.php.

References $urls, $wgDnsBlacklistUrls, $wgEnableDnsBlacklist, $wgEnableSorbs, $wgProxyWhitelist, $wgSorbsUrl, and inDnsBlacklist().

Referenced by getBlockedStatus().

User::isEmailConfirmationPending (  ) 

Check whether there is an outstanding request for e-mail confirmation.

Returns:
Boolean : True if pending

Definition at line 3110 of file User.php.

References $wgEmailAuthentication, isEmailConfirmed(), and wfTimestamp().

User::isEmailConfirmed (  ) 

Is this user's e-mail address valid-looking and confirmed within limits of the current site configuration?

Note:
If $wgEmailAuthentication is on, this may require the user to have confirmed their address by returning a code or using a password sent to the address from the wiki.
Returns:
Boolean : True if confirmed

Definition at line 3089 of file User.php.

References $wgEmailAuthentication, getEmailAuthenticationTimestamp(), isAnon(), load(), and wfRunHooks().

Referenced by canReceiveEmail(), canSendEmail(), and isEmailConfirmationPending().

User::isHidden (  ) 

Check if user account is hidden.

Returns:
{} True if hidden, false otherwise

Definition at line 1481 of file User.php.

References $wgAuth, and getBlockedStatus().

static User::isIP ( name  )  [static]

Does the string match an anonymous IPv4 address?

This function exists for username validation, in order to reject usernames which are similar in form to IP addresses. Strings such as 300.300.300.300 will return true because it looks like an IP address, despite not being strictly valid.

We match {1,3}\.{1,3}\.{1,3}\.xxx as an anonymous IP address because the usemod software would "cloak" anonymous IP addresses like this, if we allowed accounts like this to be created new users could get the old edits of these anonymous users.

Parameters:
$name  String : String to match
Returns:
Boolean : True or false

Definition at line 503 of file User.php.

References $name, and IP::isIPv6().

Referenced by bottomLinks(), SkinTemplate::buildNavUrls(), Article::editUpdates(), RollbackEdits::execute(), ApiRollback::execute(), getBlockedStatus(), getId(), SearchEngine::getNearMatchInternal(), ReassignEdits::initialiseUser(), isValidUserName(), ApiQueryContributions::prepareUsername(), ApiQueryBlocks::prepareUsername(), SkinStandard::quickBar(), EditPage::showIntro(), and Article::showMissingArticle().

User::isLocked (  ) 

Check if user account is locked.

Returns:
{} True if locked, false otherwise

Definition at line 1466 of file User.php.

References $wgAuth.

User::isLoggedIn (  ) 

Get whether the user is logged in.

Returns:
Boolean : True or false

Definition at line 2190 of file User.php.

Referenced by getBlockedStatus(), and isAnon().

User::isNewbie (  ) 

Determine whether the user is a newbie.

Newbies are either anonymous IPs, or the most recently created accounts.

Returns:
Boolean : True if the user is a newbie

Definition at line 2779 of file User.php.

References isAllowed().

Referenced by pingLimiter().

User::isPasswordReminderThrottled (  ) 

Has password reminder email been sent within the last $wgPasswordReminderResendTime hours?

Returns:
Boolean : True or false

Definition at line 1900 of file User.php.

References $wgPasswordReminderResendTime, load(), and wfTimestamp().

User::isPingLimitable (  ) 

Is this user subject to rate limiting?

Returns:
True if rate limited

Definition at line 1257 of file User.php.

References $wgRateLimitsExcludedGroups, $wgRateLimitsExcludedIPs, getEffectiveGroups(), isAllowed(), and wfGetIP().

Referenced by pingLimiter().

static User::isUsableName ( name  )  [static]

Usernames which fail to pass this function will be blocked from user login and new account registrations, but may be used internally by batch processes.

If an account already exists in this form, login will be blocked by a failure to pass this function.

Parameters:
$name  String : String to match
Returns:
Boolean : True or false

Definition at line 572 of file User.php.

References $name, $wgReservedUsernames, wfMsgForContent(), and wfRunHooks().

Referenced by LoginForm::authenticateUserData(), getCanonicalName(), and isCreatableName().

static User::isValidEmailAddr ( addr  )  [static]

Does a string look like an e-mail address?

There used to be a regular expression here, it got removed because it rejected valid addresses. Actually just check if there is '@' somewhere in the given address.

Todo:
Check for RFC 2822 compilance (bug 959)
Parameters:
$addr  String : E-mail address
Returns:
Boolean : True or false

Definition at line 675 of file User.php.

References $result, and wfRunHooks().

Referenced by LoginForm::addNewAccount(), LoginForm::addNewAccountInternal(), Autopromote::checkCondition(), EmailConfirmation::execute(), and Preferences::validateEmail().

User::isValidPassword ( password  ) 

Is the input a valid password for this user?

Parameters:
$password String Desired password
Returns:
bool True or false

Definition at line 625 of file User.php.

References getPasswordValidity().

Referenced by checkPassword(), and setPassword().

static User::isValidUserName ( name  )  [static]

Is the input a valid username?

Checks if the input is a valid username, we don't want an empty string, an IP address, anything that containins slashes (would mess up subpages), is longer than the maximum allowed username size or doesn't begin with a capital letter.

Parameters:
$name  String : String to match
Returns:
Boolean : True or false

Definition at line 518 of file User.php.

References $name, $wgContLang, $wgMaxNameChars, isIP(), Title::newFromText(), and wfDebugLog().

Referenced by CheckUsernames::execute(), and getCanonicalName().

User::isWatched ( title  ) 

Check the watched status of an article.

Parameters:
$title {Title} Title of the article to look at
Returns:
True if article is watched

Definition at line 2289 of file User.php.

References $title, and WatchedItem::fromUserTitle().

User::load (  ) 

User::loadDefaults ( name = false  ) 

Set cached properties to default.

Note:
This no longer clears uncached lazy-initialised properties; the constructor does that instead.
Access:
private

Definition at line 806 of file User.php.

References $name, $wgCookiePrefix, setToken(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfTimestamp().

Referenced by PPFuzzUser::load(), load(), loadFromDatabase(), loadFromId(), and loadFromSession().

User::loadFromDatabase (  )  [private]

Load user and user_group data from the database.

$this::mId must be set, this is how the user is identified.

Returns:
True if the user exists, false if the user is anonymous

Definition at line 944 of file User.php.

References $dbr, $s, getEditCount(), loadDefaults(), loadFromRow(), wfGetDB(), and wfRunHooks().

Referenced by loadFromId().

User::loadFromId (  ) 

Load user table data, given mId has already been set.

Returns:
Boolean : false if the ID does not exist, true otherwise
Access:
private

Definition at line 279 of file User.php.

References $name, $wgMemc, loadDefaults(), loadFromDatabase(), saveToCache(), wfDebug(), and wfMemcKey().

Referenced by load(), and loadFromSession().

User::loadFromRow ( row  ) 

Initialize this object from a row from the user table.

Parameters:
$row {{}} Row from the user table to load.

Definition at line 978 of file User.php.

References decodeOptions(), wfTimestamp(), and wfTimestampOrNull().

Referenced by loadFromDatabase().

User::loadFromSession (  )  [private]

Load user data from the session or login cookie.

If there are no valid credentials, initialises the user as an anonymous user.

Returns:
Boolean : True if the user is logged in, false otherwise.

Definition at line 851 of file User.php.

References $result, $wgAutocreatePolicy, $wgBlockDisablesLogin, $wgCookiePrefix, $wgExternalAuthType, $wgMemc, isBlocked(), loadDefaults(), loadFromId(), ExternalUser::newFromCookie(), wfDebug(), wfDebugLog(), and wfRunHooks().

Referenced by load().

User::loadGroups (  )  [private]

Load the groups from the database if they aren't already loaded.

Definition at line 1004 of file User.php.

References $dbr, $res, and wfGetDB().

Referenced by addGroup(), removeGroup(), and saveToCache().

User::loadOptions (  )  [protected]

User::logout (  ) 

Log this user out.

Definition at line 2483 of file User.php.

References doLogout(), and wfRunHooks().

static User::makeGroupLinkHTML ( group,
text = '' 
) [static]

Create a link to the group in HTML, if available; else return the group name.

Parameters:
$group  String : Internal name of the group
$text  String : The text of the link
Returns:
String : HTML link to the group

Definition at line 3292 of file User.php.

References $title, $wgUser, getGroupName(), and getGroupPage().

Referenced by Preferences::profilePreferences().

static User::makeGroupLinkWiki ( group,
text = '' 
) [static]

Create a link to the group in Wikitext, if available; else return the group name.

Parameters:
$group  String : Internal name of the group
$text  String : The text of the link
Returns:
String : Wikilink to the group

Definition at line 3314 of file User.php.

References $page, $title, getGroupName(), and getGroupPage().

User::matchEditToken ( val,
salt = '' 
)

Check given value against the token value stored in the session.

A match should confirm that the form was submitted from the user's own login session, not a form submission from a third-party site.

Parameters:
$val  String : Input value to compare
$salt  String : Optional function-specific data for hashing
Returns:
Boolean : Whether the token matches

Definition at line 2886 of file User.php.

References editToken(), and wfDebug().

User::matchEditTokenNoSuffix ( val,
salt = '' 
)

Check given value against the token value stored in the session, ignoring the suffix.

Parameters:
$val  String : Input value to compare
$salt  String : Optional function-specific data for hashing
Returns:
Boolean : Whether the token matches

Definition at line 2902 of file User.php.

References editToken().

static User::newFromConfirmationCode ( code  )  [static]

Factory method to fetch whichever user has a given email confirmation code.

This code is generated when an account is created or its e-mail address has changed.

If the code is invalid or has expired, returns NULL.

Parameters:
$code Confirmation code
Returns:
{User}

Definition at line 392 of file User.php.

References $code, $dbr, newFromId(), and wfGetDB().

Referenced by EmailConfirmation::attemptConfirm(), and EmailInvalidation::attemptInvalidate().

static User::newFromId ( id  )  [static]

static User::newFromName ( name,
validate = 'valid' 
) [static]

Static factory method for creation from username.

This is slightly less efficient than newFromId(), so use newFromId() if you have both an ID and a name handy.

Parameters:
$name Username, validated by Title::newFromText()
$validate Validate username. Takes the same parameters as User::getCanonicalName(), except that true is accepted as an alias for 'valid', for BC.
Returns:
{User} The User object, or false if the username is invalid (e.g. if it contains illegal characters or is an IP address). If the username is not present in the database, the result will be a user object with a name, zero user ID and default settings.

Definition at line 353 of file User.php.

References $name, and getCanonicalName().

Referenced by EmailNotification::actuallyNotifyOnPageChange(), LoginForm::addNewAccountInternal(), SpecialResetpass::attemptReset(), LoginForm::authenticateUserData(), SpecialContributions::contributionsSub(), IPBlockForm::doMassUserBlock(), Article::editUpdates(), Undelete::execute(), Protect::execute(), MoveBatch::execute(), EditCLI::execute(), DeleteBatch::execute(), CreateAndPromote::execute(), CleanupSpam::execute(), ChangePassword::execute(), SpecialContributions::execute(), UserrightsPage::fetchUser(), CoreParserFunctions::gender(), LogEventsList::getExtraInputs(), DeletedContributionsPage::getSubTitle(), DoubleRedirectJob::getUser(), WikiRevision::importOldRevision(), ReassignEdits::initialiseUser(), LoginForm::mailPassword(), EmailUserForm::newFromURL(), Article::onArticleDelete(), DeleteDefaultMessages::reallyExecute(), EnotifNotifyJob::run(), ApiQueryWatchlist::run(), RecentChange::save(), ApiSetup::setupUser(), IPBlockForm::showForm(), EditPage::showIntro(), IPUnblockForm::showList(), Article::showMissingArticle(), EmailUserForm::validateEmailTarget(), wfSpecialBlockme(), and wfSpecialLog().

static User::newFromRow ( row  )  [static]

Create a new user object from a user row.

The row should have all fields from the user table in it.

Parameters:
$row array A row from the user table
Returns:
{User}

Definition at line 423 of file User.php.

Referenced by ConvertUserOptions::convertOptionBatch(), ApiQueryUsers::execute(), and UserArrayFromResult::setCurrent().

static User::newFromSession (  )  [static]

Create a new user object using data from session or cookies.

If the login credentials are invalid, the result is an anonymous user.

Returns:
{User}

Definition at line 411 of file User.php.

Referenced by StubUser::_newObject().

static User::newTouchedTimestamp (  )  [static, private]

Generate a current or new-future timestamp to be stored in the user_touched field when we update things.

Returns:
String : Timestamp in TS_MW format

Definition at line 1719 of file User.php.

References $wgClockSkewFudge, and wfTimestamp().

Referenced by invalidateCache(), and saveSettings().

static User::oldCrypt ( password,
userId 
) [static]

Make an old-style password hash.

Parameters:
$password  String : Plain-text password
$userId  String : User ID
Returns:
String : Password hash

Definition at line 3503 of file User.php.

References $wgPasswordSalt.

Referenced by comparePasswords(), and wfEncryptPassword().

static User::passwordChangeInputAttribs (  )  [static]

Provide an array of HTML5 attributes to put on an input element intended for the user to enter a new password.

This may include required, title, and/or pattern, depending on $wgMinimalPasswordLength.

Do *not* use this when asking the user to enter his current password! Regardless of configuration, users may have invalid passwords for whatever reason (e.g., they were set before requirements were tightened up). Only use it when asking for a new password, like on account creation or ResetPass.

Obviously, you still need to do server-side checking.

Returns:
array Array of HTML attributes suitable for feeding to Html::element(), directly or indirectly. (Don't feed to Xml::*()! That will potentially output invalid XHTML 1.0 Transitional, and will get confused by the boolean attribute syntax used.)

Definition at line 3712 of file User.php.

References $wgMinimalPasswordLength.

Referenced by SpecialResetpass::pretty().

User::pingLimiter ( action = 'edit'  ) 

Primitive rate limits: enforce maximum actions per time period to put a brake on flooding.

Note:
When using a shared cache like memcached, IP-address last-hit counters will be shared across wikis.
Parameters:
$action Action to enforce; 'edit' if unspecified
Returns:
True if a rate limiter was tripped

Definition at line 1283 of file User.php.

References $action, $keys, $result, $wgMemc, $wgRateLimitLog, $wgRateLimits, getGroups(), getId(), getName(), isNewbie(), isPingLimitable(), wfDebug(), wfGetIP(), wfMemcKey(), wfProfileIn(), wfProfileOut(), wfRunHooks(), wfTimestamp(), and wfWikiID().

static User::randomPassword (  )  [static]

Return a random password.

Sourced from mt_rand, so it's not particularly secure.

Todo:
hash random numbers to improve security, like generateToken()
Returns:
String : New random password

Definition at line 785 of file User.php.

References $i, and $wgMinimalPasswordLength.

Referenced by ApiSetup::setupUser().

User::removeGroup ( group  ) 

Remove the user from the given group.

This takes immediate effect.

Parameters:
$group  String : Name of the group to remove

Definition at line 2169 of file User.php.

References $dbw, getEffectiveGroups(), getGroupPermissions(), invalidateCache(), load(), loadGroups(), and wfGetDB().

User::removeWatch ( title  ) 

Stop watching an article.

Parameters:
$title {Title} Title of the article to look at

Definition at line 2308 of file User.php.

References $title, WatchedItem::fromUserTitle(), and invalidateCache().

User::resetOptions (  ) 

Reset all options to the site defaults.

Definition at line 2049 of file User.php.

References getDefaultOptions().

User::saveOptions (  )  [protected]

User::saveSettings (  ) 

Save this user's settings into the database.

Todo:
Only rarely do all these fields need to be set!

Definition at line 2510 of file User.php.

References $dbw, clearSharedCache(), getUserPage(), load(), newTouchedTimestamp(), saveOptions(), wfGetDB(), wfReadOnly(), and wfRunHooks().

Referenced by sendConfirmationMail().

User::saveToCache (  ) 

Save user data to the shared cache.

Definition at line 315 of file User.php.

References $name, $wgMemc, isAnon(), load(), loadGroups(), loadOptions(), and wfMemcKey().

Referenced by loadFromId().

User::sendConfirmationMail (  ) 

Generate a new e-mail confirmation token and send a confirmation/invalidation mail to the user's given address.

Returns:
Boolean : or WikiError : : True on success, a WikiError object on failure.

Definition at line 2913 of file User.php.

References $url, $wgLang, confirmationToken(), confirmationTokenUrl(), getName(), invalidationTokenUrl(), saveSettings(), sendMail(), wfGetIP(), and wfMsg().

User::sendMail ( subject,
body,
from = null,
replyto = null 
)

Send an e-mail to this user's account.

Does not check for confirmed status or validity.

Parameters:
$subject  String : Message subject
$body  String : Message body
$from  String : Optional From address; if unspecified, default $wgPasswordSender will be used
$replyto  String : Reply-To address
Returns:
Boolean : or WikiError : : True on success, a WikiError object on failure

Definition at line 2942 of file User.php.

References $wgPasswordSender, and UserMailer::send().

Referenced by sendConfirmationMail().

User::setCookie ( name,
value,
exp = 0 
) [protected]

Set a cookie on the user's client.

Wrapper for WebResponse::setCookie

Parameters:
$name  String : Name of the cookie to set
$value  String : Value to set
$exp  Integer : Expiration time, as a UNIX time value; if 0 or not specified, use the default $wgCookieExpiration

Definition at line 2432 of file User.php.

References $name, and $wgRequest.

Referenced by clearCookie(), doLogout(), and setCookies().

User::setCookiePassword ( str  ) 

Set the cookie password.

Parameters:
$str  String : New cookie password
Access:
private

Definition at line 1876 of file User.php.

References load().

User::setCookies (  ) 

Set the default cookies for this session on the user's client.

Definition at line 2448 of file User.php.

References $name, clearCookie(), getName(), getOption(), load(), setCookie(), and wfRunHooks().

User::setEmail ( str  ) 

Set the user's e-mail address.

Parameters:
$str  String : New e-mail address

Definition at line 1934 of file User.php.

References load(), and wfRunHooks().

User::setEmailAuthenticationTimestamp ( timestamp  ) 

Set the e-mail authentication timestamp.

Parameters:
$timestamp  String : TS_MW timestamp

Definition at line 3049 of file User.php.

References load(), and wfRunHooks().

Referenced by confirmEmail(), and invalidateEmail().

User::setId ( v  ) 

Set the user and reload all fields according to a given ID.

Parameters:
$v  Integer : User ID to reload

Definition at line 1514 of file User.php.

References clearInstanceCache().

User::setInternalPassword ( str  ) 

Set the password and reset the random token unconditionally.

Parameters:
$str  String : New password to set

Definition at line 1823 of file User.php.

References crypt(), load(), and setToken().

Referenced by setPassword().

User::setLoaded ( loaded  ) 

Deprecated:

Definition at line 2735 of file User.php.

References wfDeprecated().

User::setName ( str  ) 

Set the user name.

This does not reload fields from the database according to the given name. Rather, it is used to create a temporary "nonexistent user" for later addition to the database. It can also be used to set the IP address for an anonymous user to something other than the current remote IP.

Note:
User::newFromName() has rougly the same function, when the named user does not exist.
Parameters:
$str  String : New user name to set

Definition at line 1550 of file User.php.

References load().

User::setNewpassword ( str,
throttle = true 
)

Set the password for a password reminder or new account email.

Parameters:
$str  String : New password to set
$throttle  Boolean : If true, reset the throttle timestamp to the present

Definition at line 1887 of file User.php.

References crypt(), load(), and wfTimestampNow().

User::setNewtalk ( val  ) 

Update the 'You have new messages!' status.

Parameters:
$val  Boolean : Whether the user has new messages

Definition at line 1680 of file User.php.

References $changed, $wgMemc, deleteNewtalk(), getId(), getName(), invalidateCache(), isAnon(), load(), updateNewtalk(), wfMemcKey(), and wfReadOnly().

Referenced by clearAllNotifications(), and clearNotification().

User::setOption ( oname,
val 
)

Set the given option for a user.

Parameters:
$oname  String : The option to set
$val  Mixed : New value to set

Definition at line 2028 of file User.php.

References $wgDefaultUserOptions, load(), and loadOptions().

User::setPassword ( str  ) 

Set the password and reset the random token.

Calls through to authentication plugin if necessary; will have no effect if the auth plugin refuses to pass the change through or if the legal password checks fail.

As a special case, setting the password to null wipes it, so the account cannot be logged in until a new password is set, for instance via e-mail.

Parameters:
$str  String : New password to set
Exceptions:
PasswordError on failure

Definition at line 1793 of file User.php.

References $wgAuth, $wgMinimalPasswordLength, getPasswordValidity(), isValidPassword(), setInternalPassword(), wfMsg(), and wfMsgExt().

User::setRealName ( str  ) 

Set the user's real name.

Parameters:
$str  String : New real name

Definition at line 1953 of file User.php.

References load().

User::setToken ( token = false  ) 

Set the random token (used for persistent authentication) Called from loadDefaults() among other places.

Parameters:
$token  String : If specified, set the token to this value
Access:
private

Definition at line 1853 of file User.php.

References $wgProxyKey, $wgSecretKey, load(), and wfWikiID().

Referenced by loadDefaults(), and setInternalPassword().

User::SetupSession (  ) 

Deprecated:
Use wfSetupSession().

Definition at line 841 of file User.php.

References wfDeprecated(), and wfSetupSession().

User::spreadBlock (  ) 

If this (non-anonymous) user is blocked, block any IP address they've successfully logged in from.

Definition at line 2645 of file User.php.

References load(), Block::newFromDB(), wfDebug(), and wfGetIP().

Referenced by getBlockedStatus().

User::updateNewtalk ( field,
id 
)

Add or update the new messages flag.

Parameters:
$field  String : 'user_ip' for anonymous users, 'user_id' otherwise
$id  String : or Integer : : User's IP address for anonymous users, User ID otherwise
Returns:
Boolean : True if successful, false otherwise
Access:
private

Definition at line 1640 of file User.php.

References $dbw, wfDebug(), and wfGetDB().

Referenced by setNewtalk().

User::useNPPatrol (  ) 

Check whether to enable new pages patrol features for this user.

Returns:
Boolean : True or false

Definition at line 2244 of file User.php.

References $wgUseNPPatrol, $wgUseRCPatrol, and isAllowed().

User::User (  ) 

Lightweight constructor for an anonymous user.

Use the User::newFrom* factory functions for other kinds of users.

See also:
newFromName()

newFromId()

newFromConfirmationCode()

newFromSession()

newFromRow()

Definition at line 232 of file User.php.

References clearInstanceCache().

User::useRCPatrol (  ) 

Check whether to enable recent changes patrol features for this user.

Returns:
Boolean : True or false

Definition at line 2235 of file User.php.

References $wgUseRCPatrol, and isAllowed().

User::validateCache ( timestamp  ) 

Validate the cache for this account.

Parameters:
$timestamp  String : A timestamp in TS_MW format

Definition at line 1766 of file User.php.

References load().

static User::whoIs ( id  )  [static]

Get the username corresponding to a given user ID.

Parameters:
$id User ID
Returns:
The corresponding username

Definition at line 437 of file User.php.

References $dbr, and wfGetDB().

Referenced by OutputPage::blockedPage(), UserrightsPage::fetchUser(), ApiQueryUserInfo::getCurrentUserInfo(), Title::getUserPermissionsErrors(), Title::getUserPermissionsErrorsInternal(), LoginForm::userBlockedMessage(), and Block::validateBlockParams().

static User::whoIsReal ( id  )  [static]

Get the real name of a user given their user ID.

Parameters:
$id User ID
Returns:
The corresponding user's real name

Definition at line 448 of file User.php.

References $dbr, and wfGetDB().


Member Data Documentation

User::$idCacheByName = array() [static]

Definition at line 220 of file User.php.

User::$mAllRights = false [static]

String : Cached results of getAllRights()

Definition at line 188 of file User.php.

User::$mAuthLoaded

Definition at line 200 of file User.php.

User::$mBlock

Definition at line 215 of file User.php.

User::$mBlockedby

Definition at line 215 of file User.php.

User::$mBlockedGlobally

Definition at line 215 of file User.php.

User::$mBlockreason

Definition at line 215 of file User.php.

User::$mCacheVars [static]

Initial value:

 array(
                
                'mId',
                'mName',
                'mRealName',
                'mPassword',
                'mNewpassword',
                'mNewpassTime',
                'mEmail',
                'mTouched',
                'mToken',
                'mEmailAuthenticated',
                'mEmailToken',
                'mEmailTokenExpires',
                'mRegistration',
                'mEditCount',
                
                'mGroups',
                
                'mOptionOverrides',
        )
{ String :} : List of member variables which are saved to the shared cache (memcached).

Any operation which changes the corresponding database fields must call a cache-clearing function.

Definition at line 103 of file User.php.

User::$mCoreRights [static]

Initial value:

 array(
                'apihighlimits',
                'autoconfirmed',
                'autopatrol',
                'bigdelete',
                'block',
                'blockemail',
                'bot',
                'browsearchive',
                'createaccount',
                'createpage',
                'createtalk',
                'delete',
                'deletedhistory',
                'deletedtext',
                'deleterevision',
                'edit',
                'editinterface',
                'editusercssjs',
                'hideuser',
                'import',
                'importupload',
                'ipblock-exempt',
                'markbotedits',
                'minoredit',
                'move',
                'movefile',
                'move-rootuserpages',
                'move-subpages',
                'nominornewtalk',
                'noratelimit',
                'override-export-depth',
                'patrol',
                'protect',
                'proxyunbannable',
                'purge',
                'read',
                'reupload',
                'reupload-shared',
                'rollback',
                'sendemail',
                'siteadmin',
                'suppressionlog',
                'suppressredirect',
                'suppressrevision',
                'trackback',
                'undelete',
                'unwatchedpages',
                'upload',
                'upload_by_url',
                'userrights',
                'userrights-interwiki',
                'writeapi',
        )
{ String :} : Core rights.

Each of these should have a corresponding message of the form "right-$right".

Definition at line 131 of file User.php.

User::$mDataLoaded

Boolean : Whether the cache variables have been loaded.

Definition at line 200 of file User.php.

User::$mDatePreference

Definition at line 215 of file User.php.

User::$mEffectiveGroups

Definition at line 215 of file User.php.

User::$mEmail

Definition at line 192 of file User.php.

User::$mEmailAuthenticated

Definition at line 192 of file User.php.

User::$mEmailToken

Definition at line 192 of file User.php.

User::$mEmailTokenExpires

Definition at line 192 of file User.php.

User::$mFrom

String : Initialization data source if mDataLoaded==false.

May be one of:

  • 'defaults' anonymous user initialised from class defaults
  • 'name' initialise from mName
  • 'id' initialise from mId
  • 'session' log in from cookies or session if possible

Use the User::newFrom*() family of functions to set this.

Definition at line 211 of file User.php.

User::$mGroups

Definition at line 192 of file User.php.

User::$mHash

Definition at line 215 of file User.php.

User::$mHideName

Definition at line 215 of file User.php.

User::$mId

Definition at line 192 of file User.php.

User::$mLocked

Definition at line 215 of file User.php.

User::$mName

Definition at line 192 of file User.php.

User::$mNewpassTime

Definition at line 192 of file User.php.

User::$mNewpassword

Definition at line 192 of file User.php.

User::$mNewtalk

Definition at line 215 of file User.php.

User::$mOptionOverrides

Definition at line 192 of file User.php.

User::$mOptions

Definition at line 215 of file User.php.

User::$mOptionsLoaded

Definition at line 200 of file User.php.

User::$mPassword

Definition at line 192 of file User.php.

User::$mRealName

Definition at line 192 of file User.php.

User::$mRegistration

Definition at line 192 of file User.php.

User::$mRights

Definition at line 215 of file User.php.

User::$mSkin

Definition at line 215 of file User.php.

User::$mToggles [static]

Initial value:

 array(
                'highlightbroken',
                'justify',
                'hideminor',
                'extendwatchlist',
                'usenewrc',
                'numberheadings',
                'showtoolbar',
                'editondblclick',
                'editsection',
                'editsectiononrightclick',
                'showtoc',
                'rememberpassword',
                'editwidth',
                'watchcreations',
                'watchdefault',
                'watchmoves',
                'watchdeletion',
                'minordefault',
                'previewontop',
                'previewonfirst',
                'nocache',
                'enotifwatchlistpages',
                'enotifusertalkpages',
                'enotifminoredits',
                'enotifrevealaddr',
                'shownumberswatching',
                'fancysig',
                'externaleditor',
                'externaldiff',
                'showjumplinks',
                'uselivepreview',
                'forceeditsummary',
                'watchlisthideminor',
                'watchlisthidebots',
                'watchlisthideown',
                'watchlisthideanons',
                'watchlisthideliu',
                'ccmeonemails',
                'diffonly',
                'showhiddencats',
                'noconvertlink',
                'norollbackdiff',
        )
{ String :} : A list of default user toggles, i.e., boolean user preferences that are displayed by Special:Preferences as checkboxes.

This list can be extended via the UserToggles hook or by $wgContLang::getExtraUserToggles().

Definition at line 52 of file User.php.

User::$mToken

Definition at line 192 of file User.php.

User::$mTouched

Definition at line 192 of file User.php.


The documentation for this class was generated from the following file:

Generated on Sat Apr 30 22:57:52 2011 for MediaWiki by  doxygen 1.5.9