Fix login with leading zero

This commit is contained in:
Kumi 2022-08-21 08:02:53 +00:00
parent 07182c8e76
commit 20966b273e
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -142,6 +142,7 @@ class auth_plugin_crewauth extends auth_plugin_base {
$user = $DB->get_record('user', array('username'=>(string)(int)$_POST["username"], 'mnethostid'=>$CFG->mnet_localhost_id));
$user->auth = $this->authtype;
$DB->update_record("user", $user, $bulk=false);
$_POST["username"] = (string)(int)$_POST["username"];
}
}