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:
Krista Koivisto
2016-03-08 00:32:05 +01:00
committed by Eloy Lafuente (stronk7)
parent 11106f6cee
commit ea8987644f
+4
View File
@@ -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();