Commit 030b0230 authored by Luke081515's avatar Luke081515
Browse files

fix editcount

parent 05665cb8
Pipeline #811 failed with stages
in 22 minutes and 59 seconds
......@@ -656,10 +656,10 @@ class Core extends Password {
*/
public function getUserEditcount ($username) {
$result = $this->httpRequest("action=query&format=json&list=users&usprop=editcount&ususers=" . urlencode($username), $this->job, "GET");
$result = json_decode($result, true);
if (isset($result['query']['users'][0]['missing']))
return false;
$result = json_decode($result, true);
return $result["query"]["users"][0]["editcount"];
return $result['query']['users'][0]['editcount'];
}
/** checkUserBlock
* checks if a user is blocked
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment