Merge branch 'MDL-63974-master' of https://github.com/snake/moodle

This commit is contained in:
Jun Pataleta 2018-11-15 11:22:16 +08:00
commit 91194bfd9f
4 changed files with 759 additions and 516 deletions

View file

@ -1366,12 +1366,7 @@ class core_message_external extends external_api {
* @since 3.6
*/
public static function message_search_users($userid, $search, $limitfrom = 0, $limitnum = 0) {
global $CFG, $USER;
// Check if messaging is enabled.
if (empty($CFG->messaging)) {
throw new moodle_exception('disabled', 'message');
}
global $USER;
$systemcontext = context_system::instance();