Users
Extends AbstractMediawikiObjectMediaWiki API Users class.
since |
1.0 |
---|---|
package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) : mixed
since |
1.0 |
---|
Arguments
- options
\Joomla\Registry\Registry
Mediawiki options object.- client
\Joomla\Mediawiki\Http
The 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
string
User name.- add
array
Add the user to these groups.- remove
array
Remove the user from these groups.- reason
string
Reason 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
string
Username, IP address or IP range you want to block.- expiry
string
Relative expiry time, Default: never.- reason
string
Reason for block (optional).- anononly
bool
Block anonymous users only.- nocreate
bool
Prevent account creation.- autoblock
bool
Automatically block the last used IP address, and any subsequent IP addresses they try to login from.- noemail
bool
Prevent user from sending e-mail through the wiki.- hidename
bool
Hide the username from the block log.- allowusertalk
bool
Allow the user to edit their own talk page.- reblock
bool
If the user is already blocked, overwrite the existing block.- watchuser
bool
Watch the user/IP's user and talk pages.
Response
object
buildParameter
Method to build request parameters from a string array.
buildParameter(array params) : string
since |
1.0 |
---|
Arguments
- params
array
string array that contains the parameters
Response
string
request 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
string
User to send email to.- subject
string
Subject header.- text
string
Mail body.- ccme
bool
Send 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
since |
1.0 |
---|
Arguments
- path
string
URL to inflect
Response
string
The request URL.
getCurrentUserInfo
Method to get current user information.
getCurrentUserInfo(array uiprop = null) : object
since |
1.0 |
---|
Arguments
- uiprop
array
What pieces of information to include.
Response
object
getToken
Method to get access token.
getToken(string user, string intoken) : object
since |
1.0 |
---|
Arguments
- user
string
The User to get token.- intoken
string
The 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
string
The users to retrieve contributions for.- ucuserprefix
string
Retrieve contributions for all users whose names begin with this value.- uclimit
int
The users to retrieve contributions for.- ucstart
string
The start timestamp to return from.- ucend
string
The end timestamp to return to.- uccontinue
bool
When more results are available, use this to continue.- ucdir
string
In which direction to enumerate.- ucnamespace
array
Only list contributions in these namespaces.- ucprop
array
Include additional pieces of information.- ucshow
array
Show only items that meet this criteria.- uctag
string
Only list revisions tagged with this tag.- uctoponly
string
Only 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
array
A list of users to obtain the same information for.- usprop
array
What 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
string
User Name.- lgpassword
string
Password.- lgdomain
string
Domain (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
int
Username, IP address or IP range you want to unblock.- reason
string
Reason for unblock (optional).
Response
object
unBlockUserByName
Method to unblock a user.
unBlockUserByName(string user, string reason = null) : object
since |
1.0 |
---|
Arguments
- user
string
Username, IP address or IP range you want to unblock.- reason
string
Reason for unblock (optional).
Response
object
validateResponse
Method to validate response for errors
validateResponse(\Joomla\Http\Response response) : \SimpleXMLElement
since |
1.0 |
---|---|
throws |
|
Arguments
- response
\Joomla\Http\Response
The response from the mediawiki server.
Response
\SimpleXMLElement
Properties
options
Options for the Mediawiki object.
since |
1.0 |
---|
Type(s)
\Joomla\Registry\Registry
client
The HTTP client object to use in sending HTTP requests.
since |
1.0 |
---|
Type(s)
\Joomla\Mediawiki\Http