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) : 
inherited
since

1.0

Arguments

options

Registry|nullMediawiki options object.

client

Http|nullThe HTTP client object.

Response

mixed

assignGroup

Method to assign a user to a group.

assignGroup( username, mixed||string|int add = null, mixed||string|int remove = null,  reason = null) : 
since

1.0

Arguments

username

stringUser name.

add

array<string|int, mixed>Add the user to these groups.

remove

array<string|int, mixed>Remove the user from these groups.

reason

stringReason for the change.

Response

object

blockUser

Method to block a user.

blockUser( user,  expiry = null,  reason = null,  anononly = null,  nocreate = null,  autoblock = null,  noemail = null,  hidename = null,  allowusertalk = null,  reblock = null,  watchuser = null) : 
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(mixed||string|int params) : 
inherited
since

1.0

Arguments

params

array<string|int, mixed>string array that contains the parameters

Response

stringrequest parameter

emailUser

Method to email a user.

emailUser( target,  subject = null,  text = null,  ccme = null) : 
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( path) : 
inherited
since

1.0

Arguments

path

stringURL to inflect

Response

stringThe request URL.

getCurrentUserInfo

Method to get current user information.

getCurrentUserInfo(array uiprop = null) : 
since

1.0

Arguments

uiprop

array<string|int, mixed>|nullWhat pieces of information to include.

Response

object

getToken

Method to get access token.

getToken( user,  intoken) : 
since

1.0

Arguments

user

stringThe User to get token.

intoken

stringThe type of token.

Response

string

getUserContribs

Method to get user contributions.

getUserContribs( ucuser = null,  ucuserprefix = null,  uclimit = null,  ucstart = null,  ucend = null,  uccontinue = null,  ucdir = null, array ucnamespace = null, array ucprop = null, array ucshow = null,  uctag = null,  uctoponly = null) : 
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

array<string|int, mixed>|nullOnly list contributions in these namespaces.

ucprop

array<string|int, mixed>|nullInclude additional pieces of information.

ucshow

array<string|int, mixed>|nullShow 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(mixed||string|int ususers, array usprop = null) : 
since

1.0

Arguments

ususers

array<string|int, mixed>A list of users to obtain the same information for.

usprop

array<string|int, mixed>|nullWhat pieces of information to include.

Response

object

login

Method to login and get authentication tokens.

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

1.0

Arguments

lgname

stringUser Name.

lgpassword

stringPassword.

lgdomain

stringDomain (optional).

Response

object

logout

Method to logout and clear session data.

logout() : 
since

1.0

Response

object

unBlockUserByID

Method to unblock a user.

unBlockUserByID( id,  reason = null) : 
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( user,  reason = null) : 
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

ResponseThe response from the mediawiki server.

Response

SimpleXMLElement

Properties

options

Options for the Mediawiki object.

inherited
since

1.0

Type(s)

Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

Http