From 20966b273ebb6086c09b00adb65cdcbdb4f54bc4 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 21 Aug 2022 08:02:53 +0000 Subject: [PATCH] Fix login with leading zero --- auth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/auth.php b/auth.php index 3eb5441..b7dae67 100644 --- a/auth.php +++ b/auth.php @@ -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"]; } }