Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 69beb9a8af921f97f49138b9db94a8c0a5246d92 1 parent d66683e
exe-cutor authored
Showing with 7 additions and 11 deletions.
  1. +3 −10 auth/shibboleth/auth.php
  2. +4 −1 auth/shibboleth/index.php
13 auth/shibboleth/auth.php
View
@@ -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');
- // }
- // }
}
/**
5 auth/shibboleth/index.php
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.