Commit ac8f3a5f authored by Robert Lyon's avatar Robert Lyon

Bug 1853364: Only populating the user object if user found

behatnotneeded

Change-Id: Ia1351273cc400a61370381403d968e3f4534ae13
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 260b9431
......@@ -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