JMediawikiUsers

Extends \JMediawikiObject

MediaWiki API Users class for the Joomla Platform.

since

3.1.4

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JMediawikiHttp $client = null) 
inherited
since

3.1.4

Arguments

$options

\Joomla\Registry\RegistryMediawiki options object.

$client

\JMediawikiHttpThe HTTP client object.

assignGroup

Method to assign a user to a group.

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

3.1.4

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, boolean $anononly = null, boolean $nocreate = null, boolean $autoblock = null, boolean $noemail = null, boolean $hidename = null, boolean $allowusertalk = null, boolean $reblock = null, boolean $watchuser = null) : object
since

3.1.4

Arguments

$user

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

$expiry

stringRelative expiry time, Default: never.

$reason

stringReason for block (optional).

$anononly

booleanBlock anonymous users only.

$nocreate

booleanPrevent account creation.

$autoblock

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

$noemail

booleanPrevent user from sending email through the wiki.

$hidename

booleanHide the username from the block log.

$allowusertalk

booleanAllow the user to edit their own talk page.

$reblock

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

$watchuser

booleanWatch 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

3.1.4

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, boolean $ccme = null) : object
since

3.1.4

Arguments

$target

stringUser to send email to.

$subject

stringSubject header.

$text

stringMail body.

$ccme

booleanSend 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

3.1.4

Arguments

$path

stringURL to inflect

Response

stringThe request URL.

getCurrentUserInfo

Method to get current user information.

getCurrentUserInfo(array $uiprop = null) : object
since

3.1.4

Arguments

$uiprop

arrayWhat pieces of information to include.

Response

object

getToken

Method to get access token.

getToken(string $user, string $intoken) : object
since

3.1.4

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, integer $uclimit = null, string $ucstart = null, string $ucend = null, boolean $uccontinue = null, string $ucdir = null, array $ucnamespace = null, array $ucprop = null, array $ucshow = null, string $uctag = null, string $uctoponly = null) : object
since

3.1.4

Arguments

$ucuser

stringThe users to retrieve contributions for.

$ucuserprefix

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

$uclimit

integerThe users to retrieve contributions for.

$ucstart

stringThe start timestamp to return from.

$ucend

stringThe end timestamp to return to.

$uccontinue

booleanWhen 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

3.1.4

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

3.1.4

Arguments

$lgname

stringUser Name.

$lgpassword

stringPassword.

$lgdomain

stringDomain (optional).

Response

object

logout

Method to logout and clear session data.

logout() : object
since

3.1.4

Response

object

unBlockUserById

Method to unblock a user.

unBlockUserById(integer $id, string $reason = null) : object
since

3.1.4

Arguments

$id

integerUsername, 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

3.1.4

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(\JHttpresponse $response) : Object
inherited
since

3.1.4

throws

\DomainException

Arguments

$response

\JHttpresponsereponse from the mediawiki server

Response

Object

Properties

options

Options for the MediaWiki object.

inherited
since

3.1.4

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

3.1.4

Type(s)

\JMediawikiHttp