mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
MDL-63183 auth_shibboleth: Don't render page when already logged in
This commit is contained in:
parent
5f9955b5a0
commit
e862985a69
@ -62,7 +62,19 @@
|
||||
$PAGE->set_heading($site->fullname);
|
||||
|
||||
echo $OUTPUT->header();
|
||||
include("index_form.html");
|
||||
|
||||
if (isloggedin() and !isguestuser()) {
|
||||
// Prevent logging when already logged in, we do not want them to relogin by accident because sesskey would be changed.
|
||||
echo $OUTPUT->box_start();
|
||||
$params = array('sesskey' => sesskey(), 'loginpage' => 1);
|
||||
$logout = new single_button(new moodle_url('/login/logout.php', $params), get_string('logout'), 'post');
|
||||
$continue = new single_button(new moodle_url('/'), get_string('cancel'), 'get');
|
||||
echo $OUTPUT->confirm(get_string('alreadyloggedin', 'error', fullname($USER)), $logout, $continue);
|
||||
echo $OUTPUT->box_end();
|
||||
} else {
|
||||
include("index_form.html");
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user