Merge branch 'MDL-62919-master' of git://github.com/cescobedo/moodle

This commit is contained in:
Jun Pataleta 2018-07-24 16:24:39 +08:00
commit f7497ace8a
2 changed files with 6 additions and 10 deletions

View File

@ -71,8 +71,8 @@ if ($show_instructions) {
<?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");
} ?>
@ -82,14 +82,14 @@ if ($show_instructions) {
</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>

View File

@ -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'];