Users

Extends AbstractMediawikiObject

MediaWiki API Users class.

since

1.0

package

Joomla Framework

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) : mixed
inherited
since

1.0

Arguments

options

\Joomla\Registry\RegistryMediawiki options object.

client

\Joomla\Mediawiki\HttpThe HTTP client object.

Response

mixed

assignGroup

Method to assign a user to a group.

assignGroup(string username, array add = null, array remove = null, string reason = null) : object
since

1.0

Arguments

username

stringUser name.

add

arrayAdd the user to these groups.

remove

arrayRemove the user from these groups.

reason

stringReason for the change.

Response

object

blockUser

Method to block a user.

blockUser(string user, string expiry = null, string reason = null, bool anononly = null, bool nocreate = null, bool autoblock = null, bool noemail = null, bool hidename = null, bool allowusertalk = null, bool reblock = null, bool watchuser = null) : object
since

1.0

Arguments

user

stringUsername, IP address or IP range you want to block.

expiry

stringRelative expiry time, Default: never.

reason

stringReason for block (optional).

anononly

boolBlock anonymous users only.

nocreate

boolPrevent account creation.

autoblock

boolAutomatically block the last used IP address, and any subsequent IP addresses they try to login from.

noemail

boolPrevent user from sending e-mail through the wiki.

hidename

boolHide the username from the block log.

allowusertalk

boolAllow the user to edit their own talk page.

reblock

boolIf the user is already blocked, overwrite the existing block.

watchuser

boolWatch the user/IP's user and talk pages.

Response

object

buildParameter

Method to build request parameters from a string array.

buildParameter(array params) : string
inherited
since

1.0

Arguments

params

arraystring array that contains the parameters

Response

stringrequest parameter

emailUser

Method to email a user.

emailUser(string target, string subject = null, string text = null, bool ccme = null) : object
since

1.0

Arguments

target

stringUser to send email to.

subject

stringSubject header.

text

stringMail body.

ccme

boolSend a copy of this mail to me.

Response

object

fetchUrl

Method to build and return a full request URL for the request.

fetchUrl(string path) : string
inherited
since

1.0

Arguments

path

stringURL to inflect

Response

stringThe request URL.

getCurrentUserInfo

Method to get current user information.

getCurrentUserInfo(array uiprop = null) : object
since

1.0

Arguments

uiprop

arrayWhat pieces of information to include.

Response

object

getToken

Method to get access token.

getToken(string user, string intoken) : object
since

1.0

Arguments

user

stringThe User to get token.

intoken

stringThe type of token.

Response

object

getUserContribs

Method to get user contributions.

getUserContribs(string ucuser = null, string ucuserprefix = null, int uclimit = null, string ucstart = null, string ucend = null, bool uccontinue = null, string ucdir = null, array ucnamespace = null, array ucprop = null, array ucshow = null, string uctag = null, string uctoponly = null) : object
since

1.0

Arguments

ucuser

stringThe users to retrieve contributions for.

ucuserprefix

stringRetrieve contributions for all users whose names begin with this value.

uclimit

intThe users to retrieve contributions for.

ucstart

stringThe start timestamp to return from.

ucend

stringThe end timestamp to return to.

uccontinue

boolWhen more results are available, use this to continue.

ucdir

stringIn which direction to enumerate.

ucnamespace

arrayOnly list contributions in these namespaces.

ucprop

arrayInclude additional pieces of information.

ucshow

arrayShow only items that meet this criteria.

uctag

stringOnly list revisions tagged with this tag.

uctoponly

stringOnly list changes which are the latest revision

Response

object

getUserInfo

Method to get user information.

getUserInfo(array ususers, array usprop = null) : object
since

1.0

Arguments

ususers

arrayA list of users to obtain the same information for.

usprop

arrayWhat pieces of information to include.

Response

object

login

Method to login and get authentication tokens.

login(string lgname, string lgpassword, string lgdomain = null) : object
since

1.0

Arguments

lgname

stringUser Name.

lgpassword

stringPassword.

lgdomain

stringDomain (optional).

Response

object

logout

Method to logout and clear session data.

logout() : object
since

1.0

Response

object

unBlockUserByID

Method to unblock a user.

unBlockUserByID(int id, string reason = null) : object
since

1.0

Arguments

id

intUsername, IP address or IP range you want to unblock.

reason

stringReason for unblock (optional).

Response

object

unBlockUserByName

Method to unblock a user.

unBlockUserByName(string user, string reason = null) : object
since

1.0

Arguments

user

stringUsername, IP address or IP range you want to unblock.

reason

stringReason for unblock (optional).

Response

object

validateResponse

Method to validate response for errors

validateResponse(\Joomla\Http\Response response) : \SimpleXMLElement
inherited
since

1.0

throws

\DomainException

Arguments

response

\Joomla\Http\ResponseThe response from the mediawiki server.

Response

\SimpleXMLElement

Properties

options

Options for the Mediawiki object.

inherited
since

1.0

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

\Joomla\Mediawiki\Http