]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18138 added option to supply username as GET param - based on patch by Robert...
authorskodak <skodak>
Sat, 7 Feb 2009 22:55:05 +0000 (22:55 +0000)
committerskodak <skodak>
Sat, 7 Feb 2009 22:55:05 +0000 (22:55 +0000)
login/index.php

index 68fedfb618db6c4c70654be9cca66428f23be55b..dcb3a65af71adc0e49307bc1bdff956f433c05c8 100644 (file)
     }
 
     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 = "";
     }