MediaWiki  master
MediaWiki\User\UserGroupManager Class Reference

Managers user groups. More...

Inheritance diagram for MediaWiki\User\UserGroupManager:
Collaboration diagram for MediaWiki\User\UserGroupManager:

Public Member Functions

 __construct (ServiceOptions $options, ConfiguredReadOnlyMode $configuredReadOnlyMode, ILBFactory $loadBalancerFactory, HookContainer $hookContainer, UserEditTracker $userEditTracker, LoggerInterface $logger, array $clearCacheCallbacks=[], $dbDomain=false)
 
 addUserToAutopromoteOnceGroups (UserIdentity $user, string $event)
 Add the user to the group if he/she meets given criteria. More...
 
 addUserToGroup (UserIdentity $user, string $group, string $expiry=null, bool $allowUpdate=false)
 Add the user to the given group. More...
 
 clearCache (UserIdentity $user)
 Cleans cached group memberships for a given user. More...
 
 getQueryInfo ()
 Return the tables and fields to be selected to construct new UserGroupMembership object using newGroupMembershipFromRow method. More...
 
 getUserAutopromoteGroups (UserIdentity $user)
 Get the groups for the given user based on $wgAutopromote. More...
 
 getUserAutopromoteOnceGroups (UserIdentity $user, string $event)
 Get the groups for the given user based on the given criteria. More...
 
 getUserEffectiveGroups (UserIdentity $user, int $queryFlags=self::READ_NORMAL, bool $recache=false)
 Get the list of implicit group memberships the user has. More...
 
 getUserFormerGroups (UserIdentity $user, int $queryFlags=self::READ_NORMAL)
 Returns the groups the user has belonged to. More...
 
 getUserGroupMemberships (UserIdentity $user, int $queryFlags=self::READ_NORMAL)
 Loads and returns UserGroupMembership objects for all the groups a user currently belongs to. More...
 
 getUserGroups (UserIdentity $user, int $queryFlags=self::READ_NORMAL)
 Get the list of explicit group memberships this user has. More...
 
 getUserImplicitGroups (UserIdentity $user, int $queryFlags=self::READ_NORMAL, bool $recache=false)
 Get the list of implicit group memberships this user has. More...
 
 listAllGroups ()
 Return the set of defined explicit groups. More...
 
 listAllImplicitGroups ()
 Get a list of all configured implicit groups. More...
 
 loadGroupMembershipsFromArray (UserIdentity $user, array $userGroups, int $queryFlags=self::READ_NORMAL)
 Load the user groups cache from the provided user groups data. More...
 
 newGroupMembershipFromRow (\stdClass $row)
 Creates a new UserGroupMembership instance from $row. More...
 
 purgeExpired ()
 Purge expired memberships from the user_groups table. More...
 
 removeUserFromGroup (UserIdentity $user, string $group)
 Remove the user from the given group. More...
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 
- Public Attributes inherited from IDBAccessObject
const READ_NONE = -1
 Constants for object loading bitfield flags (higher => higher QoS) More...
 

Private Member Functions

 canUseCachedValues (UserIdentity $user, string $cacheKind, int $queryFlags)
 Determines if it's ok to use cached options values for a given user and query flags. More...
 
 checkCondition (array $cond, User $user)
 As recCheckCondition, but not recursive. More...
 
 clearUserCacheForKind (UserIdentity $user, string $cacheKind)
 Clears a cached group membership and query key for a given user. More...
 
 getCacheKey (UserIdentity $user)
 Gets a unique key for various caches. More...
 
 getDBConnectionRefForQueryFlags (int $queryFlags)
 
 recCheckCondition ( $cond, User $user)
 Recursively check a condition. More...
 
 setCache (UserIdentity $user, string $cacheKind, array $groupValue, int $queryFlags)
 Sets cached group memberships and query flags for a given user. More...
 

Private Attributes

callable[] $clearCacheCallbacks
 
string false $dbDomain
 
HookContainer $hookContainer
 
HookRunner $hookRunner
 
ILoadBalancer $loadBalancer
 
ILBFactory $loadBalancerFactory
 
LoggerInterface $logger
 
ServiceOptions $options
 
array $queryFlagsUsedForCaching = []
 An assoc. More...
 
ReadOnlyMode $readOnlyMode
 
UserEditTracker $userEditTracker
 
array $userGroupCache = []
 Service caches, an assoc. More...
 
const CACHE_EFFECTIVE = 'effective'
 string key for effective groups cache More...
 
const CACHE_FORMER = 'former'
 string key for former groups cache More...
 
const CACHE_IMPLICIT = 'implicit'
 string key for implicit groups cache More...
 
const CACHE_MEMBERSHIP = 'membership'
 string key for group memberships cache More...
 

Detailed Description

Managers user groups.

Since
1.35

Definition at line 51 of file UserGroupManager.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\User\UserGroupManager::__construct ( ServiceOptions  $options,
ConfiguredReadOnlyMode  $configuredReadOnlyMode,
ILBFactory  $loadBalancerFactory,
HookContainer  $hookContainer,
UserEditTracker  $userEditTracker,
LoggerInterface  $logger,
array  $clearCacheCallbacks = [],
  $dbDomain = false 
)

Member Function Documentation

◆ addUserToAutopromoteOnceGroups()

MediaWiki\User\UserGroupManager::addUserToAutopromoteOnceGroups ( UserIdentity  $user,
string  $event 
)

Add the user to the group if he/she meets given criteria.

Contrary to autopromotion by $wgAutopromote, the group will be possible to remove manually via Special:UserRights. In such case it will not be re-added automatically. The user will also not lose the group if they no longer meet the criteria.

Parameters
UserIdentity$userUser to add to the groups
string$eventKey in $wgAutopromoteOnce (each event has groups/criteria)
Returns
array Array of groups the user has been promoted to.
See also
$wgAutopromoteOnce

Definition at line 569 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\addUserToGroup(), MediaWiki\User\UserIdentity\getId(), MediaWiki\User\UserGroupManager\getUserAutopromoteOnceGroups(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), MediaWiki\User\UserGroupManager\getUserGroups(), WikiMap\isCurrentWikiDbDomain(), and User\newFromIdentity().

◆ addUserToGroup()

MediaWiki\User\UserGroupManager::addUserToGroup ( UserIdentity  $user,
string  $group,
string  $expiry = null,
bool  $allowUpdate = false 
)

Add the user to the given group.

This takes immediate effect. If the user is already in the group, the expiry time will be updated to the new expiry time. (If $expiry is omitted or null, the membership will be altered to never expire.)

Parameters
UserIdentity$user
string$groupName of the group to add
string | null$expiryOptional expiry timestamp in any format acceptable to wfTimestamp(), or null if the group assignment should not expire
bool$allowUpdateWhether to perform "upsert" instead of INSERT
Exceptions
InvalidArgumentException
Returns
bool

Definition at line 707 of file UserGroupManager.php.

References $dbr, DeferredUpdates\addCallableUpdate(), MediaWiki\User\UserGroupManager\clearUserCacheForKind(), DB_MASTER, DB_REPLICA, MediaWiki\User\UserIdentity\getId(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), MediaWiki\User\UserIdentity\isRegistered(), User\newFromIdentity(), MediaWiki\User\UserGroupManager\setCache(), JobQueueGroup\singleton(), and wfTimestamp().

Referenced by MediaWiki\User\UserGroupManager\addUserToAutopromoteOnceGroups().

◆ canUseCachedValues()

MediaWiki\User\UserGroupManager::canUseCachedValues ( UserIdentity  $user,
string  $cacheKind,
int  $queryFlags 
)
private

Determines if it's ok to use cached options values for a given user and query flags.

Parameters
UserIdentity$user
string$cacheKindone of self::CACHE_* constants
int$queryFlags
Returns
bool

Definition at line 1031 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\getCacheKey(), MediaWiki\User\UserIdentity\isRegistered(), and IDBAccessObject\READ_NONE.

Referenced by MediaWiki\User\UserGroupManager\getUserEffectiveGroups(), MediaWiki\User\UserGroupManager\getUserFormerGroups(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), and MediaWiki\User\UserGroupManager\getUserImplicitGroups().

◆ checkCondition()

MediaWiki\User\UserGroupManager::checkCondition ( array  $cond,
User  $user 
)
private

As recCheckCondition, but not recursive.

The only valid conditions are those whose first element is one of APCOND_* defined in Defines.php. Other types will throw an exception if no extension evaluates them.

Parameters
array$condA condition, which must not contain other conditions
User$userThe user to check the condition against
Returns
bool Whether the condition is true for the user
Exceptions
InvalidArgumentExceptionif autopromote condition was not recognized.

Definition at line 496 of file UserGroupManager.php.

References APCOND_AGE, APCOND_AGE_FROM_EDIT, APCOND_BLOCKED, APCOND_EDITCOUNT, APCOND_EMAILCONFIRMED, APCOND_INGROUPS, APCOND_IPINRANGE, APCOND_ISBOT, APCOND_ISIP, User\getBlock(), User\getEmail(), User\getEmailAuthenticationTimestamp(), MediaWiki\MediaWikiServices\getInstance(), getPermissionManager(), User\getRegistration(), User\getRequest(), MediaWiki\User\UserGroupManager\getUserGroups(), User\isRegistered(), Sanitizer\validateEmail(), and wfTimestampOrNull().

Referenced by MediaWiki\User\UserGroupManager\recCheckCondition().

◆ clearCache()

MediaWiki\User\UserGroupManager::clearCache ( UserIdentity  $user)

Cleans cached group memberships for a given user.

Parameters
UserIdentity$user

Definition at line 969 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\getCacheKey().

◆ clearUserCacheForKind()

MediaWiki\User\UserGroupManager::clearUserCacheForKind ( UserIdentity  $user,
string  $cacheKind 
)
private

Clears a cached group membership and query key for a given user.

Parameters
UserIdentity$user
string$cacheKindone of self::CACHE_* constants

Definition at line 1000 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\getCacheKey().

Referenced by MediaWiki\User\UserGroupManager\addUserToGroup(), MediaWiki\User\UserGroupManager\getUserImplicitGroups(), and MediaWiki\User\UserGroupManager\removeUserFromGroup().

◆ getCacheKey()

◆ getDBConnectionRefForQueryFlags()

MediaWiki\User\UserGroupManager::getDBConnectionRefForQueryFlags ( int  $queryFlags)
private
Parameters
int$queryFlagsa bit field composed of READ_XXX flags
Returns
DBConnRef

Definition at line 1010 of file UserGroupManager.php.

References DBAccessObjectUtils\getDBOptions().

Referenced by MediaWiki\User\UserGroupManager\getUserFormerGroups(), and MediaWiki\User\UserGroupManager\getUserGroupMemberships().

◆ getQueryInfo()

MediaWiki\User\UserGroupManager::getQueryInfo ( )

Return the tables and fields to be selected to construct new UserGroupMembership object using newGroupMembershipFromRow method.

Returns
array With three keys:
  • tables: (string[]) to include in the $table to IDatabase->select()
  • fields: (string[]) to include in the $vars to IDatabase->select()
  • joins: (string[]) to include in the $joins to IDatabase->select()

Definition at line 882 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\getUserGroupMemberships(), and MediaWiki\User\UserGroupManager\purgeExpired().

◆ getUserAutopromoteGroups()

MediaWiki\User\UserGroupManager::getUserAutopromoteGroups ( UserIdentity  $user)

Get the groups for the given user based on $wgAutopromote.

Parameters
UserIdentity$userThe user to get the groups for
Returns
array Array of groups to promote to.
See also
$wgAutopromote

Definition at line 364 of file UserGroupManager.php.

References User\newFromIdentity(), and MediaWiki\User\UserGroupManager\recCheckCondition().

Referenced by MediaWiki\User\UserGroupManager\getUserImplicitGroups().

◆ getUserAutopromoteOnceGroups()

MediaWiki\User\UserGroupManager::getUserAutopromoteOnceGroups ( UserIdentity  $user,
string  $event 
)

Get the groups for the given user based on the given criteria.

Does not return groups the user already belongs to or has once belonged.

Parameters
UserIdentity$userThe user to get the groups for
string$eventKey in $wgAutopromoteOnce (each event has groups/criteria)
Returns
array Groups the user should be promoted to.
See also
$wgAutopromoteOnce

Definition at line 390 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\getUserFormerGroups(), MediaWiki\User\UserGroupManager\getUserGroups(), User\newFromIdentity(), and MediaWiki\User\UserGroupManager\recCheckCondition().

Referenced by MediaWiki\User\UserGroupManager\addUserToAutopromoteOnceGroups().

◆ getUserEffectiveGroups()

MediaWiki\User\UserGroupManager::getUserEffectiveGroups ( UserIdentity  $user,
int  $queryFlags = self::READ_NORMAL,
bool  $recache = false 
)

Get the list of implicit group memberships the user has.

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

Parameters
UserIdentity$user
int$queryFlags
bool$recacheWhether to avoid the cache
Returns
string[] Array of String internal group names

Definition at line 281 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\CACHE_EFFECTIVE, MediaWiki\User\UserGroupManager\canUseCachedValues(), MediaWiki\User\UserGroupManager\getCacheKey(), MediaWiki\User\UserGroupManager\getUserGroups(), MediaWiki\User\UserGroupManager\getUserImplicitGroups(), User\newFromIdentity(), and MediaWiki\User\UserGroupManager\setCache().

◆ getUserFormerGroups()

MediaWiki\User\UserGroupManager::getUserFormerGroups ( UserIdentity  $user,
int  $queryFlags = self::READ_NORMAL 
)

Returns the groups the user has belonged to.

The user may still belong to the returned groups. Compare with getGroups().

The function will not return groups the user had belonged to before MW 1.17

Parameters
UserIdentity$user
int$queryFlags
Returns
array Names of the groups the user has belonged to.

Definition at line 323 of file UserGroupManager.php.

References $res, MediaWiki\User\UserGroupManager\CACHE_FORMER, MediaWiki\User\UserGroupManager\canUseCachedValues(), MediaWiki\User\UserGroupManager\getCacheKey(), MediaWiki\User\UserGroupManager\getDBConnectionRefForQueryFlags(), MediaWiki\User\UserIdentity\getId(), MediaWiki\User\UserIdentity\isRegistered(), and MediaWiki\User\UserGroupManager\setCache().

Referenced by MediaWiki\User\UserGroupManager\getUserAutopromoteOnceGroups(), and MediaWiki\User\UserGroupManager\removeUserFromGroup().

◆ getUserGroupMemberships()

◆ getUserGroups()

MediaWiki\User\UserGroupManager::getUserGroups ( UserIdentity  $user,
int  $queryFlags = self::READ_NORMAL 
)

Get the list of explicit group memberships this user has.

The implicit * and user groups are not included.

Parameters
UserIdentity$user
int$queryFlags
Returns
string[]

Definition at line 634 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\getUserGroupMemberships().

Referenced by MediaWiki\User\UserGroupManager\addUserToAutopromoteOnceGroups(), MediaWiki\User\UserGroupManager\checkCondition(), MediaWiki\User\UserGroupManager\getUserAutopromoteOnceGroups(), and MediaWiki\User\UserGroupManager\getUserEffectiveGroups().

◆ getUserImplicitGroups()

MediaWiki\User\UserGroupManager::getUserImplicitGroups ( UserIdentity  $user,
int  $queryFlags = self::READ_NORMAL,
bool  $recache = false 
)

Get the list of implicit group memberships this user has.

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

Parameters
UserIdentity$user
int$queryFlags
bool$recacheWhether to avoid the cache
Returns
string[] internal group names

Definition at line 241 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\CACHE_IMPLICIT, MediaWiki\User\UserGroupManager\canUseCachedValues(), MediaWiki\User\UserGroupManager\clearUserCacheForKind(), MediaWiki\User\UserGroupManager\getCacheKey(), MediaWiki\User\UserGroupManager\getUserAutopromoteGroups(), MediaWiki\User\UserIdentity\isRegistered(), and MediaWiki\User\UserGroupManager\setCache().

Referenced by MediaWiki\User\UserGroupManager\getUserEffectiveGroups().

◆ listAllGroups()

MediaWiki\User\UserGroupManager::listAllGroups ( )

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 171 of file UserGroupManager.php.

◆ listAllImplicitGroups()

MediaWiki\User\UserGroupManager::listAllImplicitGroups ( )

Get a list of all configured implicit groups.

Returns
string[]

Definition at line 185 of file UserGroupManager.php.

◆ loadGroupMembershipsFromArray()

MediaWiki\User\UserGroupManager::loadGroupMembershipsFromArray ( UserIdentity  $user,
array  $userGroups,
int  $queryFlags = self::READ_NORMAL 
)

Load the user groups cache from the provided user groups data.

Definition at line 216 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\newGroupMembershipFromRow(), and MediaWiki\User\UserGroupManager\setCache().

◆ newGroupMembershipFromRow()

MediaWiki\User\UserGroupManager::newGroupMembershipFromRow ( \stdClass  $row)

Creates a new UserGroupMembership instance from $row.

The fields required to build an instance could be found using getQueryInfo() method.

Parameters
\\stdClass$rowA database result object
Returns
UserGroupMembership

Definition at line 198 of file UserGroupManager.php.

References wfTimestamp().

Referenced by MediaWiki\User\UserGroupManager\getUserGroupMemberships(), and MediaWiki\User\UserGroupManager\loadGroupMembershipsFromArray().

◆ purgeExpired()

MediaWiki\User\UserGroupManager::purgeExpired ( )

Purge expired memberships from the user_groups table.

Definition at line 901 of file UserGroupManager.php.

References $res, DB_MASTER, MediaWiki\User\UserGroupManager\getQueryInfo(), LIST_AND, and LIST_OR.

◆ recCheckCondition()

MediaWiki\User\UserGroupManager::recCheckCondition (   $cond,
User  $user 
)
private

Recursively check a condition.

Conditions are in the form [ '&' or '|' or '^' or '!', cond1, cond2, ... ] where cond1, cond2, ... are themselves conditions; OR APCOND_EMAILCONFIRMED, OR [ APCOND_EMAILCONFIRMED ], OR [ APCOND_EDITCOUNT, number of edits ], OR [ APCOND_AGE, seconds since registration ], OR similar constructs defined by extensions. This function evaluates the former type recursively, and passes off to checkCondition for evaluation of the latter type.

Parameters
mixed$condA condition, possibly containing other conditions
User$userThe user to check the conditions against
Returns
bool Whether the condition is true

Definition at line 437 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\checkCondition().

Referenced by MediaWiki\User\UserGroupManager\getUserAutopromoteGroups(), and MediaWiki\User\UserGroupManager\getUserAutopromoteOnceGroups().

◆ removeUserFromGroup()

MediaWiki\User\UserGroupManager::removeUserFromGroup ( UserIdentity  $user,
string  $group 
)

Remove the user from the given group.

This takes immediate effect.

Parameters
UserIdentity$user
string$groupName of the group to remove
Exceptions
InvalidArgumentException
Returns
bool

Definition at line 818 of file UserGroupManager.php.

References MediaWiki\User\UserGroupManager\clearUserCacheForKind(), DB_MASTER, MediaWiki\User\UserIdentity\getId(), MediaWiki\User\UserGroupManager\getUserFormerGroups(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), MediaWiki\User\UserIdentity\isRegistered(), User\newFromIdentity(), and MediaWiki\User\UserGroupManager\setCache().

◆ setCache()

MediaWiki\User\UserGroupManager::setCache ( UserIdentity  $user,
string  $cacheKind,
array  $groupValue,
int  $queryFlags 
)
private

Member Data Documentation

◆ $clearCacheCallbacks

callable [] MediaWiki\User\UserGroupManager::$clearCacheCallbacks
private

Definition at line 88 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $dbDomain

string false MediaWiki\User\UserGroupManager::$dbDomain
private

Definition at line 91 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $hookContainer

HookContainer MediaWiki\User\UserGroupManager::$hookContainer
private

Definition at line 73 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $hookRunner

HookRunner MediaWiki\User\UserGroupManager::$hookRunner
private

Definition at line 76 of file UserGroupManager.php.

◆ $loadBalancer

ILoadBalancer MediaWiki\User\UserGroupManager::$loadBalancer
private

Definition at line 70 of file UserGroupManager.php.

◆ $loadBalancerFactory

ILBFactory MediaWiki\User\UserGroupManager::$loadBalancerFactory
private

Definition at line 67 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $logger

LoggerInterface MediaWiki\User\UserGroupManager::$logger
private

Definition at line 85 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $options

ServiceOptions MediaWiki\User\UserGroupManager::$options
private

Definition at line 64 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $queryFlagsUsedForCaching

array MediaWiki\User\UserGroupManager::$queryFlagsUsedForCaching = []
private

An assoc.

array that stores query flags used to retrieve user groups from the database and is stored in the following format:

userKey => [ self::CACHE_IMPLICIT => implicit groups query flag self::CACHE_EFFECTIVE => effective groups query flag self::CACHE_MEMBERSHIP => membership groups query flag self::CACHE_FORMER => former groups query flag ]

Definition at line 129 of file UserGroupManager.php.

◆ $readOnlyMode

ReadOnlyMode MediaWiki\User\UserGroupManager::$readOnlyMode
private

Definition at line 79 of file UserGroupManager.php.

◆ $userEditTracker

UserEditTracker MediaWiki\User\UserGroupManager::$userEditTracker
private

Definition at line 82 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\__construct().

◆ $userGroupCache

array MediaWiki\User\UserGroupManager::$userGroupCache = []
private

Service caches, an assoc.

array keyed after the user-keys generated by the getCacheKey method and storing values in the following format:

userKey => [ self::CACHE_IMPLICIT => implicit groups cache self::CACHE_EFFECTIVE => effective groups cache self::CACHE_MEMBERSHIP => [ ] // Array of UserGroupMembership objects self::CACHE_FORMER => former groups cache ]

Definition at line 116 of file UserGroupManager.php.

◆ CACHE_EFFECTIVE

const MediaWiki\User\UserGroupManager::CACHE_EFFECTIVE = 'effective'
private

string key for effective groups cache

Definition at line 97 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\getUserEffectiveGroups().

◆ CACHE_FORMER

const MediaWiki\User\UserGroupManager::CACHE_FORMER = 'former'
private

string key for former groups cache

Definition at line 103 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\getUserFormerGroups().

◆ CACHE_IMPLICIT

const MediaWiki\User\UserGroupManager::CACHE_IMPLICIT = 'implicit'
private

string key for implicit groups cache

Definition at line 94 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\getUserImplicitGroups().

◆ CACHE_MEMBERSHIP

const MediaWiki\User\UserGroupManager::CACHE_MEMBERSHIP = 'membership'
private

string key for group memberships cache

Definition at line 100 of file UserGroupManager.php.

Referenced by MediaWiki\User\UserGroupManager\getUserGroupMemberships().

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\User\UserGroupManager::CONSTRUCTOR_OPTIONS
Initial value:
= [
'Autopromote',
'AutopromoteOnce',
'AutopromoteOnceLogInRC',
'EmailAuthentication',
'ImplicitGroups',
'GroupPermissions',
'RevokePermissions',
]

Definition at line 53 of file UserGroupManager.php.


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