Commit 9800df01 authored by Luke081515's avatar Luke081515
Browse files

Use better check

* uses a better check for "missing
parent f6f2c723
......@@ -593,9 +593,9 @@ class Core extends Password {
* @param $username - The username of the user
* @returs true if the user does exist, false if not
*/
public function checkUserExistence ($username) {
public function checkUserExistence($username) {
$result = $this->httpRequest('action=query&format=json&list=users&usprop=&ususers=' . urlencode($username), $this->job, 'GET');
if (strpos($result, "missing") !== false)
if (isset($result['query']['users'][0]['missing']))
return false;
return true;
}
......
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