Commit 8c71166e authored by Luke081515's avatar Luke081515
Browse files

Use better handling for missing

* Using better handling for missing, does not conflict if the username contains "missing"
parent 8ed2a80d
......@@ -621,7 +621,7 @@ class Core extends Password {
public function checkUserMail ($username) {
$result = $this->httpRequest('action=query&format=json&list=users&usprop=emailable&ususers=' . urlencode($username), $this->job, 'GET');
if (strpos($result, "missing") !== false)
if (isset($result['query']['users'][0]['missing']))
return false;
if (strpos($result, "emailable") !== 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