Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-44082 mod_chat: added a security check for users already in the c…

…hat activity
  • Loading branch information...
commit 7748e17207b1a28118d9dc622878da22f956d3fe 1 parent aea3249
@andyjdavis andyjdavis authored danpoltawski committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 mod/chat/chat_ajax.php
View
5 mod/chat/chat_ajax.php
@@ -52,6 +52,11 @@
$PAGE->set_cm($cm, $course, $chat);
$PAGE->set_url('/mod/chat/chat_ajax.php', array('chat_sid'=>$chat_sid));
+require_login($course, false, $cm);
+
+$context = context_module::instance($cm->id);
+require_capability('mod/chat:chat', $context);
+
ob_start();
header('Expires: Sun, 28 Dec 1997 09:32:45 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
Please sign in to comment.
Something went wrong with that request. Please try again.