56
56
//Get the user theme and enough info to be used in chat_format_message() which passes it along to
57
57
// chat_format_message_manually() -- and only id and timezone are used.
58
if (!$USER = $DB->get_record('user', array('id'=>$chatuser->userid))) { // no optimisation here, it would break again in future!
58
if (!$user = $DB->get_record('user', array('id'=>$chatuser->userid, 'deleted'=>0, 'suspended'=>0))) { // no optimisation here, it would break again in future!
59
59
print_error('invaliduser');
63
63
//Setup course, lang and theme
64
64
$PAGE->set_course($course);