From d00377f5843cb408865cb82e689815454d62adf3 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 6 Sep 2003 03:34:52 +0000 Subject: [PATCH] Added hack for guest login with seeing login page --- login/index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index 550d822611..da57ff85b4 100644 --- a/login/index.php +++ b/login/index.php @@ -19,8 +19,16 @@ } } + $frm = false; + if (!empty($SESSION->wantsurl) and strstr($SESSION->wantsurl,"username=guest")) { + /// Log in as guest automatically (idea from Zbigniew Fiedorowicz) + $frm->username = "guest"; + $frm->password = "guest"; + } else { + $frm = data_submitted(); + } - if ($frm = data_submitted()) { + if ($frm) { $frm->username = trim(moodle_strtolower($frm->username)); $user = authenticate_user_login($frm->username, $frm->password); update_login_count(); -- 2.39.5