~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to mod/chat/gui_header_js/jsupdated.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
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');
60
60
}
61
 
$USER->description = '';
 
61
\core\session\manager::set_user($user);
62
62
 
63
63
//Setup course, lang and theme
64
64
$PAGE->set_course($course);