Users
扩展 AbstractMediawikiObjectMediaWiki API Users 类。
| 自 |
1.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
__construct
构造函数。
__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) :
assignGroup
将用户分配给组的方法。
assignGroup( username, mixed||string|int add = null, mixed||string|int remove = null, reason = null) :
| 自 |
1.0 |
|---|
参数
- username
string用户名。- add
array<string|int, mixed>将用户添加到这些组。- remove
array<string|int, mixed>从这些组中删除用户。- reason
string更改原因。
响应
object
blockUser
阻止用户的方法。
blockUser( user, expiry = null, reason = null, anononly = null, nocreate = null, autoblock = null, noemail = null, hidename = null, allowusertalk = null, reblock = null, watchuser = null) :
| 自 |
1.0 |
|---|
参数
- user
string要阻止的用户名、IP 地址或 IP 范围。- expiry
string相对过期时间,默认:永不过期。- reason
string阻止原因(可选)。- anononly
bool仅阻止匿名用户。- nocreate
bool阻止帐户创建。- autoblock
bool自动阻止最后使用的 IP 地址,以及他们尝试登录的任何后续 IP 地址。- noemail
bool阻止用户通过维基发送电子邮件。- hidename
bool在阻止日志中隐藏用户名。- allowusertalk
bool允许用户编辑自己的讨论页面。- reblock
bool如果用户已被阻止,则覆盖现有阻止。- watchuser
bool监视用户/IP 的用户和讨论页面。
响应
object
buildParameter
从字符串数组构建请求参数的方法。
buildParameter(mixed||string|int params) :
| 自 |
1.0 |
|---|
参数
- params
array<string|int, mixed>包含参数的字符串数组
响应
string请求参数
emailUser
向用户发送电子邮件的方法。
emailUser( target, subject = null, text = null, ccme = null) :
| 自 |
1.0 |
|---|
参数
- target
string要发送电子邮件的用户。- subject
string主题标题。- text
string邮件正文。- ccme
bool向我发送此邮件的副本。
响应
object
fetchUrl
构建并返回请求的完整请求 URL 的方法。
fetchUrl( path) :
| 自 |
1.0 |
|---|
参数
- path
string要影响的 URL
响应
string请求 URL。
getCurrentUserInfo
获取当前用户信息的方法。
getCurrentUserInfo(array uiprop = null) :
| 自 |
1.0 |
|---|
参数
- uiprop
array<string|int, mixed>|null要包含的信息片段。
响应
object
getToken
获取访问令牌的方法。
getToken( user, intoken) :
| 自 |
1.0 |
|---|
参数
- user
string要获取令牌的用户。- intoken
string令牌类型。
响应
string
getUserContribs
获取用户贡献的方法。
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) :
| 自 |
1.0 |
|---|
参数
- ucuser
string要检索其贡献的用户。- ucuserprefix
string检索所有以该值开头的名称的用户贡献。- uclimit
int要检索其贡献的用户。- ucstart
string要返回的开始时间戳。- ucend
string要返回的结束时间戳。- uccontinue
bool当有更多结果可用时,使用此选项继续。- ucdir
string枚举的方向。- ucnamespace
array<string|int, mixed>|null仅列出这些命名空间中的贡献。- ucprop
array<string|int, mixed>|null包含其他信息片段。- ucshow
array<string|int, mixed>|null仅显示符合此条件的项目。- uctag
string仅列出使用此标记标记的修订版。- uctoponly
string仅列出作为最新修订版的更改
响应
object
getUserInfo
获取用户信息的方法。
getUserInfo(mixed||string|int ususers, array usprop = null) :
| 自 |
1.0 |
|---|
参数
- ususers
array<string|int, mixed>要获取相同信息的用户信息列表。- usprop
array<string|int, mixed>|null要包含的信息片段。
响应
object
login
登录并获取身份验证令牌的方法。
login( lgname, lgpassword, lgdomain = null) :
| 自 |
1.0 |
|---|
参数
- lgname
string用户名。- lgpassword
string密码。- lgdomain
string域(可选)。
响应
object
logout
注销并清除会话数据的方法。
logout() :
| 自 |
1.0 |
|---|
响应
object
unBlockUserByID
解除阻止用户的方法。
unBlockUserByID( id, reason = null) :
| 自 |
1.0 |
|---|
参数
- id
int要解除阻止的用户名、IP 地址或 IP 范围。- reason
string解除阻止的原因(可选)。
响应
object
unBlockUserByName
解除阻止用户的方法。
unBlockUserByName( user, reason = null) :
| 自 |
1.0 |
|---|
参数
- user
string要解除阻止的用户名、IP 地址或 IP 范围。- reason
string解除阻止的原因(可选)。
响应
object
validateResponse
验证响应以查找错误的方法
validateResponse(\Joomla\Http\Response response) : \SimpleXMLElement