From 3f6941a6550bce3dbca256f570579581aed035dc Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 2 Apr 2007 09:26:07 +0000 Subject: [PATCH] MDL-9166 auth plugins can prevent showing of last logged in user; merged from MOODLE_18_STABLE --- login/index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index 4e4d63a6e7..5f1aa4f2bc 100644 --- a/login/index.php +++ b/login/index.php @@ -165,7 +165,14 @@ httpsrequired(); update_user_login_times(); - set_moodle_cookie($USER->username); + if (empty($CFG->nolastloggedin)) { + set_moodle_cookie($USER->username); + } else { + // do not store last logged in user in cookie + // auth plugins can temporarily override this from loginpage_hook() + // do not save $CFG->nolastloggedin in database! + set_moodle_cookie('nobody'); + } set_login_session_preferences(); /// This is what lets the user do anything on the site :-) -- 2.39.5