Commit 0a05b027 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1853364: Only populating the user object if user found"

parents 9990ff0d ac8f3a5f
......@@ -274,8 +274,10 @@ class User {
. '
)';
$user = get_record_sql($sql, array($username, $instanceid));
$this->populate($user);
return $this;
if ($user) {
$this->populate($user);
return $this;
}
}
$sql = 'SELECT
*,
......
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