mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Can provide an alternate page for the login form.
The page must contain a form with an action field set to /login/index.php and return fields username and password TODO It may be worth checking the URL when it's entered at admin/auth.php to ensure it is at least pointing to a valid page as an incorrect URL could potentially lock all users out of a site.
This commit is contained in:
parent
f4cbf7f214
commit
5b2ae5848c
4 changed files with 29 additions and 2 deletions
|
@ -61,6 +61,9 @@
|
|||
if (! isset($config->guestloginbutton)) {
|
||||
$config->guestloginbutton = 1;
|
||||
}
|
||||
if (! isset($config->alternateloginurl)) {
|
||||
$config->alternateloginurl = '';
|
||||
}
|
||||
if (! isset($config->auth_instructions)) {
|
||||
$config->auth_instructions = "";
|
||||
}
|
||||
|
@ -160,6 +163,22 @@
|
|||
echo "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
/// An alternate url for the login form. It means we can use login forms that are integrated
|
||||
/// into non-moodle pages
|
||||
echo '<tr valign="top">';
|
||||
echo '<td algin="right" nowrap="nowrap">';
|
||||
print_string('alternateloginurl', 'auth');
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<input type="text" size="40" name="alternateloginurl" alt="'.get_string('alternateloginurl', 'auth').'" value="'.$config->alternateloginurl.'" />';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
print_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot.'/login/index.php'));
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
echo '</table>';
|
||||
echo '<p align="center"><input type="submit" value="'.get_string('savechanges').'"></p>';
|
||||
echo '</form>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue