MediaWiki  REL1_19
UserRightsProxy Class Reference

Cut-down copy of User interface for local-interwiki-database user rights manipulation. More...

List of all members.

Public Member Functions

 addGroup ($group)
 Replaces User::addUserGroup()
 getDBName ()
 Accessor for $this->database.
 getGroups ()
 Replaces User::getUserGroups()
 getId ()
 getName ()
 Same as User::getName()
 getUserPage ()
 Same as User::getUserPage()
 invalidateCache ()
 Replaces User::touchUser()
 isAnon ()
 removeGroup ($group)
 Replaces User::removeUserGroup()
 saveSettings ()
 setOption ($option, $value)
 Replaces User::setOption()

Static Public Member Functions

static getDB ($database, $ignoreInvalidDB=false)
 Open a database connection to work on for the requested user.
static newFromId ($database, $id, $ignoreInvalidDB=false)
 Factory function; get a remote user entry by ID number.
static newFromName ($database, $name, $ignoreInvalidDB=false)
 Factory function; get a remote user entry by name.
static validDatabase ($database)
 Confirm the selected database name is a valid local interwiki database name.
static whoIs ($database, $id, $ignoreInvalidDB=false)
 Same as User::whoIs()

Private Member Functions

 __construct ($db, $database, $name, $id)
 Constructor.

Static Private Member Functions

static newFromLookup ($database, $field, $value, $ignoreInvalidDB=false)

Detailed Description

Cut-down copy of User interface for local-interwiki-database user rights manipulation.

Definition at line 7 of file UserRightsProxy.php.


Constructor & Destructor Documentation

UserRightsProxy::__construct ( db,
database,
name,
id 
) [private]

Constructor.

See also:
newFromId()
newFromName()
Parameters:
$dbDatabaseBase: db connection
$databaseString: database name
$nameString: user name
$idInteger: user ID

Definition at line 19 of file UserRightsProxy.php.


Member Function Documentation

Replaces User::addUserGroup()

Definition at line 182 of file UserRightsProxy.php.

static UserRightsProxy::getDB ( database,
ignoreInvalidDB = false 
) [static]

Open a database connection to work on for the requested user.

This may be a new connection to another database for remote users.

Parameters:
$databaseString
$ignoreInvalidDBBoolean: if true, don't check if $database is in $wgLocalDatabases
Returns:
DatabaseBase or null if invalid selection

Definition at line 119 of file UserRightsProxy.php.

References $wgDBname, and wfGetDB().

Referenced by newFromLookup().

Here is the call graph for this function:

Here is the caller graph for this function:

Accessor for $this->database.

Returns:
String: database name

Definition at line 32 of file UserRightsProxy.php.

Replaces User::getUserGroups()

Definition at line 167 of file UserRightsProxy.php.

References $res.

Returns:
int

Definition at line 135 of file UserRightsProxy.php.

Referenced by isAnon().

Here is the caller graph for this function:

Same as User::getName()

Returns:
String

Definition at line 151 of file UserRightsProxy.php.

Referenced by getUserPage().

Here is the caller graph for this function:

Same as User::getUserPage()

Returns:
Title object

Definition at line 160 of file UserRightsProxy.php.

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

Here is the call graph for this function:

Replaces User::touchUser()

Definition at line 230 of file UserRightsProxy.php.

References $wgMemc, and wfForeignMemcKey().

Referenced by saveSettings().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
bool

Definition at line 142 of file UserRightsProxy.php.

References getId().

Here is the call graph for this function:

static UserRightsProxy::newFromId ( database,
id,
ignoreInvalidDB = false 
) [static]

Factory function; get a remote user entry by ID number.

Parameters:
$databaseString: database name
$idInteger: user ID
$ignoreInvalidDBBoolean: if true, don't check if $database is in $wgLocalDatabases
Returns:
UserRightsProxy or null if doesn't exist

Definition at line 72 of file UserRightsProxy.php.

References newFromLookup().

Referenced by whoIs().

Here is the call graph for this function:

Here is the caller graph for this function:

static UserRightsProxy::newFromLookup ( database,
field,
value,
ignoreInvalidDB = false 
) [static, private]
Parameters:
$database
$field
$value
$ignoreInvalidDBbool
Returns:
null|UserRightsProxy

Definition at line 95 of file UserRightsProxy.php.

References getDB().

Referenced by newFromId(), and newFromName().

Here is the call graph for this function:

Here is the caller graph for this function:

static UserRightsProxy::newFromName ( database,
name,
ignoreInvalidDB = false 
) [static]

Factory function; get a remote user entry by name.

Parameters:
$databaseString: database name
$nameString: user name
$ignoreInvalidDBBoolean: if true, don't check if $database is in $wgLocalDatabases
Returns:
UserRightsProxy or null if doesn't exist

Definition at line 84 of file UserRightsProxy.php.

References newFromLookup().

Referenced by UserrightsPage\fetchUser().

Here is the call graph for this function:

Here is the caller graph for this function:

Replaces User::removeUserGroup()

Definition at line 195 of file UserRightsProxy.php.

Definition at line 211 of file UserRightsProxy.php.

References $rows, and invalidateCache().

Here is the call graph for this function:

UserRightsProxy::setOption ( option,
value 
)

Replaces User::setOption()

Definition at line 207 of file UserRightsProxy.php.

static UserRightsProxy::validDatabase ( database) [static]

Confirm the selected database name is a valid local interwiki database name.

Parameters:
$databaseString: database name
Returns:
Boolean

Definition at line 42 of file UserRightsProxy.php.

References $wgLocalDatabases.

Referenced by UserrightsPage\fetchUser().

Here is the caller graph for this function:

static UserRightsProxy::whoIs ( database,
id,
ignoreInvalidDB = false 
) [static]

Same as User::whoIs()

Parameters:
$databaseString: database name
$idInteger: user ID
$ignoreInvalidDBBoolean: if true, don't check if $database is in $wgLocalDatabases
Returns:
String: user name or false if the user doesn't exist

Definition at line 55 of file UserRightsProxy.php.

References $user, and newFromId().

Referenced by UserrightsPage\fetchUser().

Here is the call graph for this function:

Here is the caller graph for this function:


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