Skip to content

Commit

Permalink
Fixed bug that showed username of Shib users in manual login form
Browse files Browse the repository at this point in the history
  • Loading branch information
exe-cutor committed Apr 2, 2007
1 parent d66683e commit 69beb9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
13 changes: 3 additions & 10 deletions auth/shibboleth/auth.php
Expand Up @@ -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');
// }
// }
}

/**
Expand Down
5 changes: 4 additions & 1 deletion auth/shibboleth/index.php
Expand Up @@ -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);
Expand Down

0 comments on commit 69beb9a

Please sign in to comment.