Browse files

MDL-36101 auth_shibboleth Show appropriate error message for suspende…

…d accounts
  • Loading branch information...
Michael Aherne Michael Aherne
Michael Aherne authored and Michael Aherne committed Oct 17, 2012
1 parent 2ea4312 commit af402e56772d500a72ca9719a74783c592d84cbe
Showing with 5 additions and 3 deletions.
  1. +4 −3 auth/shibboleth/index.php
  2. +1 −0 auth/shibboleth/lang/en/auth_shibboleth.php
@@ -41,9 +41,9 @@
/// Check if the user has actually submitted login data to us
if ($shibbolethauth->user_login($frm->username, $frm->password)) {
if ($shibbolethauth->user_login($frm->username, $frm->password)
&& $user = authenticate_user_login($frm->username, $frm->password)) {
$user = authenticate_user_login($frm->username, $frm->password);
@@ -87,7 +87,8 @@
else {
// For some weird reason the Shibboleth user couldn't be authenticated
// The Shibboleth user couldn't be mapped to a valid Moodle user
print_error('shib_invalid_account_error', 'auth_shibboleth');
@@ -51,6 +51,7 @@
$string['auth_shib_only'] = 'Shibboleth only';
$string['auth_shib_only_description'] = 'Check this option if a Shibboleth authentication shall be enforced';
$string['auth_shib_username_description'] = 'Name of the webserver Shibboleth environment variable that shall be used as Moodle username';
$string['shib_invalid_account_error'] = 'You seem to be Shibboleth authenticated but Moodle has no valid account for your username. Your account may not exist or it may have been suspended.';
$string['shib_no_attributes_error'] = 'You seem to be Shibboleth authenticated but Moodle didn\'t receive any user attributes. Please check that your Identity Provider releases the necessary attributes ({$a}) to the Service Provider Moodle is running on or inform the webmaster of this server.';
$string['shib_not_all_attributes_error'] = 'Moodle needs certain Shibboleth attributes which are not present in your case. The attributes are: {$a}<br />Please contact the webmaster of this server or your Identity Provider.';
$string['shib_not_set_up_error'] = 'Shibboleth authentication doesn\'t seem to be set up correctly because no Shibboleth environment variables are present for this page. Please consult the <a href="README.txt">README</a> for further instructions on how to set up Shibboleth authentication or contact the webmaster of this Moodle installation.';

0 comments on commit af402e5

Please sign in to comment.