41 $this->database = $database;
43 $this->
id = intval( $id );
44 $this->newOptions = [];
53 return $this->database;
75 public static function whoIs( $database, $id, $ignoreInvalidDB =
false ) {
92 public static function newFromId( $database, $id, $ignoreInvalidDB =
false ) {
104 public static function newFromName( $database, $name, $ignoreInvalidDB =
false ) {
123 $userdb =
self::getDB( $database, $ignoreInvalidDB );
128 if ( $db && $userdb ) {
129 $row = $userdb->selectRow(
'user',
130 [
'user_id',
'user_name' ],
134 if ( $row !==
false ) {
137 intval( $row->user_id ) );
151 public static function getDB( $database, $ignoreInvalidDB =
false ) {
153 if ( $ignoreInvalidDB || self::validDatabase( $database ) ) {
175 return $this->
getId() == 0;
184 return $this->
name .
'@' . $this->database;
201 return array_keys( self::getGroupMemberships() );
211 return UserGroupMembership::getMembershipsForUser( $this->
id, $this->db );
227 return $ugm->insert(
true, $this->db );
237 $ugm = UserGroupMembership::getMembership( $this->
id, $group, $this->db );
241 return $ugm->delete( $this->db );
250 $this->newOptions[$option] =
$value;
255 foreach ( $this->newOptions
as $option =>
$value ) {
257 'up_user' => $this->id,
258 'up_property' => $option,
262 $this->db->replace(
'user_properties',
263 [ [
'up_user',
'up_property' ] ],
275 [
'user_touched' => $this->db->timestamp() ],
276 [
'user_id' => $this->id ],
280 $domainId = $this->db->getDomainID();
282 $this->db->onTransactionPreCommitOrIdle(
283 function ()
use ( $domainId, $userId ) {
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
$wgLocalDatabases
Other wikis on this site, can be administered from a single developer account.
$wgSharedDB
Shared database for multiple wikis.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Represents a "user group membership" – a specific instance of a user belonging to a group.
Cut-down copy of User interface for local-interwiki-database user rights manipulation.
static newFromLookup( $database, $field, $value, $ignoreInvalidDB=false)
getName()
Same as User::getName()
__construct( $db, $database, $name, $id)
static validDatabase( $database)
Confirm the selected database name is a valid local interwiki database name.
getGroupMemberships()
Replaces User::getGroupMemberships()
static newFromName( $database, $name, $ignoreInvalidDB=false)
Factory function; get a remote user entry by name.
removeGroup( $group)
Replaces User::removeGroup()
static getDB( $database, $ignoreInvalidDB=false)
Open a database connection to work on for the requested user.
getGroups()
Replaces User::getUserGroups()
setOption( $option, $value)
Replaces User::setOption()
invalidateCache()
Replaces User::touchUser()
getDBName()
Accessor for $this->database.
static newFromId( $database, $id, $ignoreInvalidDB=false)
Factory function; get a remote user entry by ID number.
static whoIs( $database, $id, $ignoreInvalidDB=false)
Same as User::whoIs()
addGroup( $group, $expiry=null)
Replaces User::addGroup()
getUserPage()
Same as User::getUserPage()
static purge( $wikiId, $userId)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
Allows to change the fields on the form that will be generated $name
and how to run hooks for an and one after Each event has a name
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly $wgDBname