isguest() to has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)

This commit is contained in:
ethem 2006-09-22 15:31:04 +00:00
parent 65e2d1f0df
commit f0f8e34c5d
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@
/// 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.");
}