Extended and corrected the error messages

This commit is contained in:
exe-cutor 2005-05-06 06:35:24 +00:00
parent 3e82613631
commit bab8ceb10e

View file

@ -12,14 +12,14 @@
if ($CFG->auth == 'shibboleth' and !empty($CFG->auth_shib_only)) { if ($CFG->auth == 'shibboleth' and !empty($CFG->auth_shib_only)) {
if (empty($CFG->shib_user_attribute)) { if (empty($CFG->shib_user_attribute)) {
error('Shibboleth authentication (shib_user_attribute) is not set up correctly'); error('Shibboleth authentication (\'shib_user_attribute\') is not set up correctly. You probably haven\'t yet configured the Shibboleth authentication. Please consult the README in moodle/auth/shibboleth for further instructions on how to set up Shibboleth authentication.');
} }
if (empty($_SERVER[$CFG->shib_user_attribute])) { if (empty($_SERVER[$CFG->shib_user_attribute])) {
error('Shibboleth authentication is not set up correctly (could not find $_SERVER[\''.$CFG->shib_user_attribute.'\'])'); error('Shibboleth authentication is not set up correctly (could not find $_SERVER[\''.$CFG->shib_user_attribute.'\']) or your moodle/auth/shibboleth/index.php is not protected by Shibboleth. Please consult the README in moodle/auth/shibboleth for further instructions on how to set up Shibboleth authentication.');
} }
} }
/// If we can find some Shibboleth information, save it in session and return to main login page /// If we can find the Shibboleth attribute, save it in session and return to main login page
if (!empty($_SERVER[$CFG->shib_user_attribute])) { // Shibboleth auto-login if (!empty($_SERVER[$CFG->shib_user_attribute])) { // Shibboleth auto-login
$frm->username = $_SERVER[$CFG->shib_user_attribute]; $frm->username = $_SERVER[$CFG->shib_user_attribute];
@ -27,7 +27,6 @@
// The random password consists of the first 8 letters of the base 64 encoded user ID // The random password consists of the first 8 letters of the base 64 encoded user ID
// This password is never used unless the user account is converted to manual // This password is never used unless the user account is converted to manual
/// Check if the user has actually submitted login data to us /// Check if the user has actually submitted login data to us
if ($user = authenticate_user_login($frm->username, $frm->password)) { if ($user = authenticate_user_login($frm->username, $frm->password)) {