mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
isguest() to has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)
This commit is contained in:
parent
65e2d1f0df
commit
f0f8e34c5d
2 changed files with 4 additions and 4 deletions
|
@ -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.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue