MediaWiki REL1_34
PPFuzzUser Class Reference
Inheritance diagram for PPFuzzUser:
Collaboration diagram for PPFuzzUser:

Public Member Functions

 getOption ( $oname, $defaultOverride=null, $ignoreHidden=false)
 Get the user's current setting for a given option.
 
 load ( $flags=null)
 Load the user table data for this object from the source given by mFrom.
 
- Public Member Functions inherited from User
 __construct ()
 Lightweight constructor for an anonymous user.
 
__get ( $name)
 
 __set ( $name, $value)
 
 __toString ()
 
 getMutableCacheKeys (WANObjectCache $cache)
 
 isSafeToLoad ()
 Test if it's safe to load this User object.
 
 loadFromId ( $flags=self::READ_NORMAL)
 Load user table data, given mId has already been set.
 
 isIPRange ()
 Is the user an IP range?
 
 isValidPassword ( $password)
 Is the input a valid password for this user?
 
 checkPasswordValidity ( $password)
 Check if this is a valid password for this user.
 
 loadDefaults ( $name=false, $actorId=null)
 Set cached properties to default.
 
 isItemLoaded ( $item, $all='all')
 Return whether an item has been loaded.
 
 trackBlockWithCookie ()
 Set the 'BlockID' cookie depending on block type and user authentication status.
 
 loadFromDatabase ( $flags=self::READ_LATEST)
 Load user and user_group data from the database.
 
 addAutopromoteOnceGroups ( $event)
 Add the user to the group if he/she meets given criteria.
 
 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', $incrBy=1)
 Primitive rate limits: enforce maximum actions per time period to put a brake on flooding.
 
 isBlocked ( $fromReplica=true)
 Check if user is blocked.
 
 getBlock ( $fromReplica=true)
 Get the block affecting the user, or null if the user is not blocked.
 
 isBlockedFrom ( $title, $fromReplica=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.
 
 getGlobalBlock ( $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.
 
 getActorId (IDatabase $dbw=null)
 Get the user's actor ID.
 
 getTitleKey ()
 Get the user's name escaped by underscores.
 
 getNewtalk ()
 Check if the user has new messages.
 
 getNewMessageLinks ()
 Return the data needed to construct links for new talk page message alerts.
 
 getNewMessageRevisionId ()
 Get the revision ID for the last talk page revision viewed by the talk page owner.
 
 setNewtalk ( $val, $curRev=null)
 Update the 'You have new messages!' status.
 
 clearSharedCache ( $mode='refresh')
 Clear user data from memcached.
 
 invalidateCache ()
 Immediately touch the user data cache for this account.
 
 touch ()
 Update the "touched" timestamp for the user.
 
 validateCache ( $timestamp)
 Validate the cache for this account.
 
 getTouched ()
 Get the user touched timestamp.
 
 getDBTouched ()
 Get the user_touched timestamp field (time of last DB updates)
 
 setPassword ( $str)
 Set the password and reset the random token.
 
 setInternalPassword ( $str)
 Set the password and reset the random token unconditionally.
 
 changeAuthenticationData (array $data)
 Changes credentials of the user.
 
 getToken ( $forceCreation=true)
 Get the user's current token.
 
 setToken ( $token=false)
 Set the random token (used for persistent authentication) Called from loadDefaults() among other places.
 
 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.
 
 setEmailWithConfirmation ( $str)
 Set the user's e-mail address and a confirmation mail if needed.
 
 getRealName ()
 Get the user's real name.
 
 setRealName ( $str)
 Set the user's real name.
 
 getOptions ( $flags=0)
 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 an integer value.
 
 setOption ( $oname, $val)
 Set the given option for a user.
 
 getTokenFromOption ( $oname)
 Get a token stored in the preferences (like the watchlist one), resetting it if it's empty (and saving changes).
 
 resetTokenFromOption ( $oname)
 Reset a token stored in the preferences (like the watchlist one).
 
 getOptionKinds (IContextSource $context, $options=null)
 Return an associative array mapping preferences keys to the kind of a preference they're used for.
 
 resetOptions ( $resetKinds=[ 'registered', 'registered-multiselect', 'registered-checkmatrix', 'unused'], IContextSource $context=null)
 Reset certain (or all) options to the site defaults.
 
 getDatePreference ()
 Get the user's preferred date format.
 
 requiresHTTPS ()
 Determine based on the wiki configuration and the user's options, whether this user must be over HTTPS no matter what.
 
 getStubThreshold ()
 Get the user preferred stub threshold.
 
 getRights ()
 Get the permissions this user has.
 
 getGroups ()
 Get the list of explicit group memberships this user has.
 
 getGroupMemberships ()
 Get the list of explicit group memberships this user has, stored as UserGroupMembership objects.
 
 getEffectiveGroups ( $recache=false)
 Get the list of implicit group memberships this user has.
 
 getAutomaticGroups ( $recache=false)
 Get the list of implicit group memberships this user has.
 
 getFormerGroups ()
 Returns the groups the user has belonged to.
 
 getEditCount ()
 Get the user's edit count.
 
 addGroup ( $group, $expiry=null)
 Add the user to the given group.
 
 removeGroup ( $group)
 Remove the user from the given group.
 
 isRegistered ()
 Alias of isLoggedIn() with a name that describes its actual functionality.
 
 isLoggedIn ()
 Get whether the user is logged in.
 
 isAnon ()
 Get whether the user is anonymous.
 
 isBot ()
 
 isAllowedAny (... $permissions)
 Check if user is allowed to access a feature / make an action.
 
 isAllowedAll (... $permissions)
 
 isAllowed ( $action='')
 Internal mechanics of testing a permission.
 
 useRCPatrol ()
 Check whether to enable recent changes patrol features for this user.
 
 useNPPatrol ()
 Check whether to enable new pages patrol features for this user.
 
 useFilePatrol ()
 Check whether to enable new files patrol features for this user.
 
 getRequest ()
 Get the WebRequest object to use with this object.
 
 isWatched ( $title, $checkRights=self::CHECK_USER_RIGHTS)
 Check the watched status of an article.
 
 addWatch ( $title, $checkRights=self::CHECK_USER_RIGHTS)
 Watch an article.
 
 removeWatch ( $title, $checkRights=self::CHECK_USER_RIGHTS)
 Stop watching an article.
 
 clearNotification (&$title, $oldid=0)
 Clear the user's notification timestamp for the given title.
 
 clearAllNotifications ()
 Resets all of the given user's page-change notification timestamps.
 
 getExperienceLevel ()
 Compute experienced level based on edit count and registration date.
 
 setCookies ( $request=null, $secure=null, $rememberMe=false)
 Persist this user's session (e.g.
 
 logout ()
 Log this user out.
 
 doLogout ()
 Clear the user's session, and reset the instance cache.
 
 saveSettings ()
 Save this user's settings into the database.
 
 idForName ( $flags=0)
 If only this user's username is known, and it exists, return the user ID.
 
 addToDatabase ()
 Add this existing user object to the database.
 
 spreadAnyEditBlock ()
 If this user is logged-in and blocked, block any IP address they've successfully logged in from.
 
 isBlockedFromCreateAccount ()
 Get whether the user is explicitly blocked from account creation.
 
 isBlockedFromEmailuser ()
 Get whether the user is blocked from using Special:Emailuser.
 
 isBlockedFromUpload ()
 Get whether the user is blocked from using Special:Upload.
 
 isAllowedToCreateAccount ()
 Get whether the user is allowed to create an account.
 
 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.
 
 getEditTokenObject ( $salt='', $request=null)
 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.
 
 getEditToken ( $salt='', $request=null)
 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='', $request=null, $maxage=null)
 Check given value against the token value stored in the session.
 
 matchEditTokenNoSuffix ( $val, $salt='', $request=null, $maxage=null)
 Check given value against the token value stored in the session, ignoring the suffix.
 
 sendConfirmationMail ( $type='created')
 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.
 
 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.
 
 getLatestEditTimestamp ()
 Get the timestamp of the latest edit.
 
 changeableGroups ()
 Returns an array of groups that this user can add and remove.
 
 incEditCount ()
 Schedule a deferred update to update the user's edit count.
 
 setEditCountInternal ( $count)
 This method should not be called outside User/UserEditCountUpdate.
 
 initEditCountInternal (IDatabase $dbr)
 Initialize user_editcount from data out of the revision table.
 
 addNewUserLogEntry ( $action=false, $reason='')
 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.
 
 getInstanceForUpdate ()
 Get a new instance of this user that was loaded from the master via a locking read.
 
 equals (UserIdentity $user)
 Checks if two user objects point to the same user.
 
 isAllowUsertalk ()
 Checks if usertalk is allowed.
 
- Public Member Functions inherited from MediaWiki\User\UserIdentity
 getActorId ()
 

Public Attributes

 $mDataLoaded
 
 $ppfz_test
 
- Public Attributes inherited from User
AbstractBlock $mBlock
 
string $mBlockedby
 
string $mEmail
 
string $mEmailAuthenticated
 
string $mFrom
 Initialization data source if mLoadedItems!==true.
 
bool $mHideName
 
int $mId
 Cache variables.
 
string $mName
 
array $mOptions
 
bool $mOptionsLoaded
 Whether the cache variables have been loaded.
 
string $mRealName
 
string $mTouched
 TS_MW timestamp from the DB.
 
const CHECK_USER_RIGHTS = true
 
const GETOPTIONS_EXCLUDE_DEFAULTS = 1
 Exclude user options that are set to their default value.
 
const IGNORE_USER_RIGHTS = false
 
const INVALID_TOKEN = '*** INVALID ***'
 An invalid string value for the user_token field.
 
const TOKEN_LENGTH = 32
 Number of characters required for the user_token field.
 
const VERSION = 14
 Version number to tag cached versions of serialized User objects.
 
- Public Attributes inherited from IDBAccessObject
const READ_LOCKING = self::READ_LATEST | 2
 Constants for object loading bitfield flags (higher => higher QoS)
 
const READ_NONE = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from User
static purge ( $dbDomain, $userId)
 
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 newFromActorId ( $id)
 Static factory method for creation from a given actor ID.
 
static newFromIdentity (UserIdentity $identity)
 Returns a User object corresponding to the given UserIdentity.
 
static newFromAnyId ( $userId, $userName, $actorId, $dbDomain=false)
 Static factory method for creation from an ID, name, and/or actor ID.
 
static newFromConfirmationCode ( $code, $flags=0)
 Factory method to fetch whichever user has a given email confirmation code.
 
static newFromSession (WebRequest $request=null)
 Create a new user object using data from session.
 
static newFromRow ( $row, $data=null)
 Create a new user object from a user row.
 
static newSystemUser ( $name, $options=[])
 Static factory method for creation of a "system" user from username.
 
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, $flags=self::READ_NORMAL)
 Get database id given a user name.
 
static resetIdByNameCache ()
 Reset the cache used in idFromName().
 
static isIP ( $name)
 Does the string match an anonymous IP 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 findUsersByGroup ( $groups, $limit=5000, $after=null)
 Return the users who are members of the given group(s).
 
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 getCanonicalName ( $name, $validate='valid')
 Given unvalidated user input, return a canonical username, or false if the username is invalid.
 
static resetGetDefaultOptionsForTestsOnly ()
 Reset the process cache of default user options.
 
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 isLocallyBlockedProxy ( $ip)
 Check if an IP address is in the local proxy list.
 
static listOptionKinds ()
 Return a list of the types of user options currently returned by User::getOptionKinds().
 
static createNew ( $name, $params=[])
 Add a user to the database, return the user object.
 
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 groupHasPermission ( $group, $role)
 Check, if the given group has the given permission.
 
static isEveryoneAllowed ( $right)
 Check if all users may be assumed to have the given permission.
 
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 TODO: Should we deprecate this? It's trivial, but we don't want to encourage use of globals.
 
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 getGrantName ( $grant)
 Get the name of a given grant.
 
static selectFields ()
 Return the list of user fields that should be selected to create a new user object.
 
static getQueryInfo ()
 Return the tables, fields, and join conditions to be selected to create a new user object.
 
static newFatalPermissionDeniedStatus ( $permission)
 Factory function for fatal permission-denied errors.
 
- Static Public Attributes inherited from User
static int[] $idCacheByName = []
 
- Protected Member Functions inherited from User
 getCacheKey (WANObjectCache $cache)
 
 loadFromCache ()
 Load user data from shared cache, given mId has already been set.
 
 setItemLoaded ( $item)
 Set that an item has been loaded.
 
 loadFromRow ( $row, $data=null)
 Initialize this object from a row from the user table.
 
 loadFromUserObject ( $user)
 Load the data for this user object from another user object.
 
 makeUpdateConditions (IDatabase $db, array $conditions)
 Builds update conditions.
 
 checkAndSetTouched ()
 Bump user_touched if it didn't change since this object was loaded.
 
 checkNewtalk ( $field, $id)
 Internal uncached check for new messages.
 
 updateNewtalk ( $field, $id, $curRev=null)
 Add or update the new messages flag.
 
 deleteNewtalk ( $field, $id)
 Clear the new messages flag for the given user.
 
 spreadBlock ()
 If this (non-anonymous) user is blocked, block the IP address they've successfully logged in from.
 
 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.
 
 getTokenUrl ( $page, $token)
 Internal function to format the e-mail validation/invalidation URLs.
 
 loadOptions ( $data=null)
 Load the user options either from cache, the database or an array.
 
 saveOptions ()
 Saves the non-default options for this user, as previously set e.g.
 
- Protected Attributes inherited from User
int null $mActorId
 
bool $mAllowUsertalk
 
string $mBlockreason
 
string $mDatePreference
 
int $mEditCount
 
array $mEffectiveGroups
 
string $mEmailToken
 
string $mEmailTokenExpires
 
array $mFormerGroups
 
AbstractBlock $mGlobalBlock
 
UserGroupMembership[] $mGroupMemberships
 Associative array of (group name => UserGroupMembership object)
 
string $mHash
 
array $mImplicitGroups
 
array bool $mLoadedItems = []
 Array with already loaded items or true if all items have been loaded.
 
bool $mLocked
 
int bool $mNewtalk
 Lazy-initialized variables, invalidated with clearInstanceCache.
 
array $mOptionOverrides
 
string $mQuickTouched
 TS_MW timestamp from cache.
 
string $mRegistration
 
string $mToken
 
int $queryFlagsUsed = self::READ_NORMAL
 User::READ_* constant bitfield used to load data.
 
- Static Protected Attributes inherited from User
static string[] $mCacheVars
 Array of Strings List of member variables which are saved to the shared cache (memcached).
 

Detailed Description

Definition at line 253 of file preprocessorFuzzTest.php.

Member Function Documentation

◆ getOption()

PPFuzzUser::getOption (   $oname,
  $defaultOverride = null,
  $ignoreHidden = false 
)

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

Parameters
string$onameThe option to check
string | array | null$defaultOverrideA default value returned if the option does not exist
bool$ignoreHiddenWhether to ignore the effects of $wgHiddenPrefs
Returns
string|array|int|null User's current value for the option
See also
getBoolOption()
getIntOption()

Reimplemented from User.

Definition at line 264 of file preprocessorFuzzTest.php.

◆ load()

PPFuzzUser::load (   $flags = null)

Load the user table data for this object from the source given by mFrom.

Parameters
int$flagsUser::READ_* constant bitfield

Reimplemented from User.

Definition at line 256 of file preprocessorFuzzTest.php.

References User\loadDefaults().

Member Data Documentation

◆ $mDataLoaded

PPFuzzUser::$mDataLoaded

Definition at line 254 of file preprocessorFuzzTest.php.

◆ $ppfz_test

PPFuzzUser::$ppfz_test

Definition at line 254 of file preprocessorFuzzTest.php.


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