From: skodak Date: Sat, 7 Feb 2009 22:55:05 +0000 (+0000) Subject: MDL-18138 added option to supply username as GET param - based on patch by Robert... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=450dcc603db217eea7ba060fef1b0e02a4bcf2d7;p=moodle.git MDL-18138 added option to supply username as GET param - based on patch by Robert Allerstorfer; merged from MOODLE_19_STABLE --- diff --git a/login/index.php b/login/index.php index 68fedfb618..dcb3a65af7 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 = ""; }