Skip to content

Commit

Permalink
MDL-62919 auth_shibboleth: Use the right shibboleth_auth_instructions
Browse files Browse the repository at this point in the history
Change $CFG->auth_instructions by shibboleth/auth_instructions in the index_form.html
  • Loading branch information
cescobedo committed Jul 17, 2018
1 parent 8c51626 commit 9de1a91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 4 additions & 4 deletions auth/shibboleth/index_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ <h2><?php print_string("firsttime") ?></h2>
<?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
print_string("loginstepsnone");
} else if ($CFG->registerauth == 'email') {
if (!empty($CFG->auth_instructions)) {
echo format_text($CFG->auth_instructions);
if (!empty($config->auth_instructions)) {
echo format_text($config->auth_instructions);
} else {
print_string("loginsteps", "", "signup.php");
} ?>
Expand All @@ -82,14 +82,14 @@ <h2><?php print_string("firsttime") ?></h2>
</form>
</div>
<?php } else if (!empty($CFG->registerauth)) {
echo format_text($CFG->auth_instructions); ?>
echo format_text($config->auth_instructions); ?>
<div class="signupform">
<form action="../../login/signup.php" method="get" id="signup">
<div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
</form>
</div>
<?php } else {
echo format_text($CFG->auth_instructions);
echo format_text($config->auth_instructions);
} ?>
</div>
</div>
Expand Down
8 changes: 2 additions & 6 deletions auth/shibboleth/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@

$loginurl = (!empty($CFG->alternateloginurl)) ? $CFG->alternateloginurl : '';


if (!empty($CFG->registerauth) or is_enabled_auth('none') or !empty($CFG->auth_instructions)) {
$config = get_config('auth_shibboleth');
if (!empty($CFG->registerauth) or is_enabled_auth('none') or !empty($config->auth_instructions)) {
$show_instructions = true;
} else {
$show_instructions = false;
}

// Set SAML domain cookie
$config = get_config('auth_shibboleth');


$IdPs = get_idp_list($config->organization_selection);
if (isset($_POST['idp']) && isset($IdPs[$_POST['idp']])){
$selectedIdP = $_POST['idp'];
Expand Down

0 comments on commit 9de1a91

Please sign in to comment.