MediaWiki REL1_37
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)
 
 __sleep ()
 
 __toString ()
 
 addAutopromoteOnceGroups ( $event)
 Add the user to the group if he/she meets given criteria.
 
 addGroup ( $group, $expiry=null)
 Add the user to the given group.
 
 addToDatabase ()
 Add this existing user object to the database.
 
 addWatch (PageIdentity $title, $checkRights=self::CHECK_USER_RIGHTS, ?string $expiry=null)
 Watch an article.
 
 authorizeRead (string $action, PageIdentity $target, PermissionStatus $status=null)
 
 authorizeWrite (string $action, PageIdentity $target, PermissionStatus $status=null)
 
 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.
 
 canReceiveEmail ()
 Is this user allowed to receive e-mails within limits of current site configuration?
 
 canSendEmail ()
 Is this user allowed to send e-mails within limits of current site configuration?
 
 changeableGroups ()
 Returns an array of groups that this user can add and remove.
 
 changeAuthenticationData (array $data)
 Changes credentials of the user.
 
 checkAndSetTouched ()
 Bump user_touched if it didn't change since this object was loaded.
 
 checkPasswordValidity ( $password)
 Check if this is a valid password for this user.
 
 clearInstanceCache ( $reloadFrom=false)
 Clear various cached data stored in this object.
 
 clearSharedCache ( $mode='refresh')
 Clear user data from memcached.
 
 confirmEmail ()
 Mark the e-mail address confirmed.
 
 definitelyCan (string $action, PageIdentity $target, PermissionStatus $status=null)
 
 doLogout ()
 Clear the user's session, and reset the instance cache.
 
 equals (?UserIdentity $user)
 Checks if two user objects point to the same user.
 
 getActorId ( $dbwOrWikiId=self::LOCAL)
 Get the user's actor ID.
 
 getAutomaticGroups ( $recache=false)
 Get the list of implicit group memberships this user has.
 
 getBlock ( $freshness=self::READ_NORMAL, $disableIpBlockExemptChecking=false)
 Get the block affecting the user, or null if the user is not blocked.
 
 getBlockId ()
 If user is blocked, return the ID for the block.
 
 getBoolOption ( $oname)
 Get the user's current setting for a given option, as a boolean value.
 
 getDatePreference ()
 Get the user's preferred date format.
 
 getDBTouched ()
 Get the user_touched timestamp field (time of last DB updates)
 
 getEditCount ()
 Get the user's edit count.
 
 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.
 
 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.
 
 getEffectiveGroups ( $recache=false)
 Get the list of implicit group memberships this user has.
 
 getEmail ()
 Get the user's e-mail address.
 
 getEmailAuthenticationTimestamp ()
 Get the timestamp of the user's e-mail authentication.
 
 getExperienceLevel ()
 Compute experienced level based on edit count and registration date.
 
 getFirstEditTimestamp ()
 Get the timestamp of the first edit.
 
 getFormerGroups ()
 Returns the groups the user has belonged to.
 
 getGlobalBlock ( $ip='')
 Check if user is blocked on all wikis.
 
 getGroupMemberships ()
 Get the list of explicit group memberships this user has, stored as UserGroupMembership objects.
 
 getGroups ()
 Get the list of explicit group memberships this user has.
 
 getId ( $wikiId=self::LOCAL)
 Get the user's ID.
 
 getInstanceForUpdate ()
 Get a new instance of this user that was loaded from the primary DB via a locking read.
 
 getIntOption ( $oname, $defaultOverride=0)
 Get the user's current setting for a given option, as an integer value.
 
 getLatestEditTimestamp ()
 Get the timestamp of the latest edit.
 
 getMutableCacheKeys (WANObjectCache $cache)
 
 getName ()
 Get the user name, or the IP of an anonymous user.
 
 getOptionKinds (IContextSource $context, $options=null)
 Return an associative array mapping preferences keys to the kind of a preference they're used for.
 
 getOptions ( $flags=0)
 Get all user's options.
 
 getRealName ()
 Get the user's real name.
 
 getRegistration ()
 Get the timestamp of account creation.
 
 getRequest ()
 Get the WebRequest object to use with this object.
 
 getRights ()
 Get the permissions this user has.
 
 getStubThreshold ()
 Get the user preferred stub threshold.
 
 getTalkPage ()
 Get this user's talk page title.
 
 getTitleKey ()
 Get the user's name escaped by underscores.
 
 getToken ( $forceCreation=true)
 Get the user's current token.
 
 getTokenFromOption ( $oname)
 Get a token stored in the preferences (like the watchlist one), resetting it if it's empty (and saving changes).
 
 getTouched ()
 Get the user touched timestamp.
 
 getUser ()
 
 getUserPage ()
 Get this user's personal page title.
 
 getWikiId ()
 Returns self::LOCAL to indicate the user is associated with the local wiki.
 
 idForName ( $flags=self::READ_NORMAL)
 If only this user's username is known, and it exists, return the user ID.
 
 incEditCount ()
 Schedule a deferred update to update the user's edit count.
 
 invalidateCache ()
 Immediately touch the user data cache for this account.
 
 invalidateEmail ()
 Invalidate the user's e-mail confirmation, and unauthenticate the e-mail address if it was already confirmed.
 
 isAllowed (string $permission)
 Checks whether this authority has the given permission in general.
 
 isAllowedAll (... $permissions)
 Checks whether this authority has any of the given permissions in general.
 
 isAllowedAny (... $permissions)
 Checks whether this authority has any of the given permissions in general.
 
 isAllowedToCreateAccount ()
 Get whether the user is allowed to create an account.
 
 isAllowUsertalk ()
 Checks if usertalk is allowed.
 
 isAnon ()
 Get whether the user is anonymous.
 
 isBlocked ( $fromReplica=true)
 Check if user is blocked.
 
 isBlockedFrom ( $title, $fromReplica=false)
 Check if user is blocked from editing a particular article.
 
 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.
 
 isBlockedGlobally ( $ip='')
 Check if user is blocked on all wikis.
 
 isBot ()
 
 isEmailConfirmationPending ()
 Check whether there is an outstanding request for e-mail confirmation.
 
 isEmailConfirmed ()
 Is this user's e-mail address valid-looking and confirmed within limits of the current site configuration?
 
 isHidden ()
 Check if user account is hidden.
 
 isIPRange ()
 Is the user an IP range?
 
 isItemLoaded ( $item, $all='all')
 Return whether an item has been loaded.
 
 isLocked ()
 Check if user account is locked.
 
 isLoggedIn ()
 Get whether the user is registered.
 
 isNewbie ()
 Determine whether the user is a newbie.
 
 isPingLimitable ()
 Is this user subject to rate limiting?
 
 isRegistered ()
 Get whether the user is registered.
 
 isSafeToLoad ()
 Test if it's safe to load this User object.
 
 isSystemUser ()
 Get whether the user is a system user.
 
 isTempWatched (PageIdentity $title, $checkRights=self::CHECK_USER_RIGHTS)
 Check if the article is temporarily watched.
 
 isValidPassword ( $password)
 Is the input a valid password for this user?
 
 isWatched (PageIdentity $title, $checkRights=self::CHECK_USER_RIGHTS)
 Check the watched status of an article.
 
 loadDefaults ( $name=false, $actorId=null)
 Set cached properties to default.
 
 loadFromDatabase ( $flags=self::READ_LATEST)
 Load user data from the database.
 
 loadFromId ( $flags=self::READ_NORMAL)
 Load user table data, given mId has already been set.
 
 logout ()
 Log this user out.
 
 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.
 
 pingLimiter ( $action='edit', $incrBy=1)
 Primitive rate limits: enforce maximum actions per time period to put a brake on flooding.
 
 probablyCan (string $action, PageIdentity $target, PermissionStatus $status=null)
 
 removeGroup ( $group)
 Remove the user from the given group.
 
 removeWatch (PageIdentity $title, $checkRights=self::CHECK_USER_RIGHTS)
 Stop watching an article.
 
 requiresHTTPS ()
 Determine based on the wiki configuration and the user's options, whether this user must be over HTTPS no matter what.
 
 resetOptions ( $resetKinds=[ 'registered', 'registered-multiselect', 'registered-checkmatrix', 'unused'], IContextSource $context=null)
 Reset certain (or all) options to the site defaults.
 
 resetTokenFromOption ( $oname)
 Reset a token stored in the preferences (like the watchlist one).
 
 saveSettings ()
 Save this user's settings into the database.
 
 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.
 
 setActorId (int $actorId)
 Sets the actor id.
 
 setCookies ( $request=null, $secure=null, $rememberMe=false)
 Persist this user's session (e.g.
 
 setEmail (string $str)
 Set the user's e-mail address.
 
 setEmailAuthenticationTimestamp ( $timestamp)
 Set the e-mail authentication timestamp.
 
 setEmailWithConfirmation (string $str)
 Set the user's e-mail address and a confirmation mail if needed.
 
 setId ( $v)
 Set the user and reload all fields according to a given ID.
 
 setItemLoaded ( $item)
 Set that an item has been loaded.
 
 setName ( $str)
 Set the user name.
 
 setOption ( $oname, $val)
 Set the given option for a user.
 
 setRealName (string $str)
 Set the user's real name.
 
 setToken ( $token=false)
 Set the random token (used for persistent authentication) Called from loadDefaults() among other places.
 
 spreadAnyEditBlock ()
 If this user is logged-in and blocked, block any IP address they've successfully logged in from.
 
 touch ()
 Update the "touched" timestamp for the user.
 
 useFilePatrol ()
 Check whether to enable new files patrol features for this user.
 
 useNPPatrol ()
 Check whether to enable new pages patrol features for this user.
 
 useRCPatrol ()
 Check whether to enable recent changes patrol features for this user.
 
 validateCache ( $timestamp)
 Validate the cache for this account.
 
- Public Member Functions inherited from MediaWiki\Permissions\Authority
 getBlock (int $freshness=self::READ_NORMAL)
 Returns any user block affecting the Authority.
 
- Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity
 assertWiki ( $wikiId)
 Throws if $wikiId is different from the return value of getWikiId().
 

Public Attributes

 $mDataLoaded
 
 $ppfz_test
 
- Public Attributes inherited from User
int null $mActorId
 Switched from protected to public for use in UserFactory.
 
AbstractBlock null $mBlock
 
string int $mBlockedby
 
string $mEmail
 
string $mEmailAuthenticated
 
string $mFrom
 Initialization data source if mLoadedItems!==true.
 
bool $mHideName
 
int $mId
 Cache variables.
 
string $mName
 
string $mRealName
 
string $mTouched
 TS_MW timestamp from the DB.
 
const CHECK_USER_RIGHTS = true
 
const GETOPTIONS_EXCLUDE_DEFAULTS = UserOptionsLookup::EXCLUDE_DEFAULTS
 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 MAINTENANCE_SCRIPT_USER = 'Maintenance script'
 Username used for various maintenance scripts.
 
const TOKEN_LENGTH = 32
 Number of characters required for the user_token field.
 

Additional Inherited Members

- Static Public Member Functions inherited from User
static changeableByGroup ( $group)
 Returns an array of the groups that a particular group can add/remove.
 
static createNew ( $name, $params=[])
 Add a user to the database, return the user object.
 
static findUsersByGroup ( $groups, $limit=5000, $after=null)
 Return the users who are members of the given group(s).
 
static getAllGroups ()
 Return the set of defined explicit groups.
 
static getCanonicalName ( $name, $validate='valid')
 Given unvalidated user input, return a canonical username, or false if the username is invalid.
 
static getDefaultOption ( $opt)
 Get a given default option value.
 
static getDefaultOptions ()
 Combine the language default options with any site-specific options and add the default language variants.
 
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 getImplicitGroups ()
 
static getQueryInfo ()
 Return the tables, fields, and join conditions to be selected to create a new user object.
 
static getRightDescription ( $right)
 Get the description of a given right.
 
static groupHasPermission ( $group, $role)
 Check, if the given group has the given permission.
 
static idFromName ( $name, $flags=self::READ_NORMAL)
 Get database id given a user name.
 
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 isIP ( $name)
 Does the string match an anonymous IP address?
 
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 isValidUserName ( $name)
 Is the input a valid username?
 
static listOptionKinds ()
 Return a list of the types of user options currently returned by User::getOptionKinds().
 
static newFatalPermissionDeniedStatus ( $permission)
 Factory function for fatal permission-denied errors.
 
static purge ( $dbDomain, $userId)
 
static resetIdByNameCache ()
 Reset the cache used in idFromName().
 
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 newFromName ( $name, $validate='valid')
 
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=self::READ_NORMAL)
 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.
 
- Protected Member Functions inherited from User
 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.
 
 getCacheKey (WANObjectCache $cache)
 
 getTokenUrl ( $page, $token)
 Internal function to format the e-mail validation/invalidation URLs.
 
 invalidationTokenUrl ( $token)
 Return a URL the user can use to invalidate their email address.
 
 loadFromCache ()
 Load user data from shared cache, given mId has already been set.
 
 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.
 
 spreadBlock ()
 If this (non-anonymous) user is blocked, block the IP address they've successfully logged in from.
 
- Protected Attributes inherited from User
bool $mAllowUsertalk
 TODO: This should be removed when User::isAllowUsertalk is removed.
 
string $mBlockreason
 TODO: This should be removed when User::BlockedFor and AbstractBlock::getReason are hard deprecated.
 
string $mDatePreference
 Lazy-initialized variables, invalidated with clearInstanceCache.
 
string $mEmailToken
 
string $mEmailTokenExpires
 
AbstractBlock $mGlobalBlock
 
string $mHash
 
array bool $mLoadedItems = []
 Array with already loaded items or true if all items have been loaded.
 
bool $mLocked
 
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
 List of member variables which are saved to the shared cache (memcached).
 

Detailed Description

Definition at line 260 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
mixed | null$defaultOverrideA default value returned if the option does not exist. Default values set via $wgDefaultUserOptions / UserGetDefaultOptions take precedence.
bool$ignoreHiddenWhether to ignore the effects of $wgHiddenPrefs
Returns
mixed|null User's current value for the option
See also
getBoolOption()
getIntOption()
Deprecated:
since 1.35 Use UserOptionsLookup::getOption instead

Reimplemented from User.

Definition at line 271 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 263 of file preprocessorFuzzTest.php.

References User\loadDefaults().

Member Data Documentation

◆ $mDataLoaded

PPFuzzUser::$mDataLoaded

Definition at line 261 of file preprocessorFuzzTest.php.

◆ $ppfz_test

PPFuzzUser::$ppfz_test

Definition at line 261 of file preprocessorFuzzTest.php.


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