diff --git a/login/index.php b/login/index.php index 68fedfb618d..dcb3a65af71 100644 --- a/login/index.php +++ b/login/index.php @@ -256,7 +256,12 @@ } if (empty($frm->username) && $authsequence[0] != 'shibboleth') { // See bug 5184 - $frm->username = get_moodle_cookie() === 'nobody' ? '' : get_moodle_cookie(); + if (!empty($_GET["username"])) { + $frm->username = $_GET["username"]; + } else { + $frm->username = get_moodle_cookie() === 'nobody' ? '' : get_moodle_cookie(); + } + $frm->password = ""; }