return;
}
+ httpsrequired();
+
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
if (empty($CFG->loginhttps)) {
error(get_string('httpsrequired', 'enrol_authorize'));
}
}
- httpsrequired();
-
$strcourses = get_string('courses');
$strloginto = get_string('loginto', '', $course->shortname);
}
print_simple_box_start('center');
- if (isguest()) {
+ if (has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
$curcost = get_course_cost($course);
echo '<div align="center">';
echo '<p>'.get_string('paymentrequired').'</p>';
/// Only site users can access to this page
require_login(); // Don't use $courseid! User may want to see old orders.
- if (isguest()) {
+ if (has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
error("Guests cannot use this page.");
}