Permalink
Browse files

Fixed bug that showed username of Shib users in manual login form

  • Loading branch information...
1 parent d66683e commit 69beb9a8af921f97f49138b9db94a8c0a5246d92 exe-cutor committed Apr 2, 2007
Showing with 7 additions and 11 deletions.
  1. +3 −10 auth/shibboleth/auth.php
  2. +4 −1 auth/shibboleth/index.php
View
13 auth/shibboleth/auth.php
@@ -148,18 +148,11 @@ function can_change_password() {
function loginpage_hook() {
global $SESSION, $CFG;
+
+ // Prevent username from being shown on login page after logout
+ $CFG->nolastloggedin = true;
- //TODO: fix the code
return;
-
- // See http://moodle.org/mod/forum/discuss.php?d=39918#187611
- // if ($CFG->auth == 'shibboleth') {
- // if (!empty($SESSION->shibboleth_checked) ) { // Just come from there
- // unset($SESSION->shibboleth_checked);
- // } else if (empty($_POST)) { // No incoming data, so redirect
- // redirect($CFG->wwwroot.'/auth/shibboleth/index.php');
- // }
- // }
}
/**
View
5 auth/shibboleth/index.php
@@ -41,7 +41,10 @@
$USER->site = $CFG->wwwroot; // for added security, store the site in the
update_user_login_times();
- set_moodle_cookie($USER->username);
+
+ // Don't show username on login page
+ set_moodle_cookie('nobody');
+
set_login_session_preferences();
unset($SESSION->lang);

0 comments on commit 69beb9a

Please sign in to comment.