mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-52774 ajax: Require authentication when getting nav branch
When getting the navigation branch data through AJAX, require login if forcelogin is set.
This commit is contained in:
parent
711f9468d4
commit
7b9fbb1cf4
@ -32,6 +32,10 @@ require_once(dirname(__FILE__) . '/../../config.php');
|
||||
/** Include course lib for its functions */
|
||||
require_once($CFG->dirroot.'/course/lib.php');
|
||||
|
||||
if (!empty($CFG->forcelogin)) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
try {
|
||||
// Start buffer capture so that we can `remove` any errors
|
||||
ob_start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user