Skip to content

Commit

Permalink
Merge branch 'MDL-51827' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 23, 2017
2 parents a741738 + e95fe51 commit ac92b9d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions login/confirm.php
Expand Up @@ -24,7 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require('../config.php');
require(__DIR__ . '/../config.php');
require(__DIR__ . '/lib.php');
require_once($CFG->libdir . '/authlib.php');

$data = optional_param('data', '', PARAM_RAW); // Formatted as: secret/username
Expand Down Expand Up @@ -61,7 +62,7 @@
echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter');
echo "<p>".get_string("alreadyconfirmed")."</p>\n";
echo $OUTPUT->single_button("$CFG->wwwroot/course/", get_string('courses'));
echo $OUTPUT->single_button(core_login_get_return_url(), get_string('courses'));
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
exit;
Expand All @@ -78,16 +79,6 @@
complete_user_login($user);

\core\session\manager::apply_concurrent_login_limit($user->id, session_id());

// Check where to go, $redirect has a higher preference.
if (empty($redirect) and !empty($SESSION->wantsurl) ) {
$redirect = $SESSION->wantsurl;
unset($SESSION->wantsurl);
}

if (!empty($redirect)) {
redirect($redirect);
}
}

$PAGE->navbar->add(get_string("confirmed"));
Expand All @@ -97,7 +88,7 @@
echo $OUTPUT->box_start('generalbox centerpara boxwidthnormal boxaligncenter');
echo "<h3>".get_string("thanks").", ". fullname($USER) . "</h3>\n";
echo "<p>".get_string("confirmed")."</p>\n";
echo $OUTPUT->single_button("$CFG->wwwroot/course/", get_string('courses'));
echo $OUTPUT->single_button(core_login_get_return_url(), get_string('continue'));
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
exit;
Expand Down

0 comments on commit ac92b9d

Please sign in to comment.