mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-10890 all require_login() in modules reviewed and fixed use of $cm
This commit is contained in:
parent
a104debf4f
commit
bb5b72244a
20 changed files with 26 additions and 21 deletions
|
@ -18,7 +18,11 @@
|
|||
error('Could not find the course this belongs to!');
|
||||
}
|
||||
|
||||
require_login($course->id);
|
||||
if (!$cm = get_coursemodule_from_instance('chat', $chat->id, $course->id)) {
|
||||
error('Course Module ID was incorrect');
|
||||
}
|
||||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
if (isguest()) {
|
||||
error('Guest does not have access to chat rooms');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue