Merge branch 'MDL-49821-master-master' of git://github.com/jleyva/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 30 Sep 2015 23:26:58 +0000 (01:26 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 30 Sep 2015 23:26:58 +0000 (01:26 +0200)
1  2 
group/externallib.php
notes/externallib.php
user/externallib.php

Simple merge
@@@ -680,17 -681,10 +681,10 @@@ class core_notes_external extends exter
          require_capability('moodle/notes:view', $context);
  
          if (!empty($params['userid'])) {
-             $user = core_user::get_user($params['userid'], 'id, deleted', MUST_EXIST);
-             if ($user->deleted) {
-                 throw new moodle_exception('userdeleted');
-             }
-             if (isguestuser($user)) {
-                 throw new moodle_exception('invaliduserid');
-             }
+             $user = core_user::get_user($params['userid'], '*', MUST_EXIST);
+             core_user::require_active_user($user);
  
 -            if ($course->id != SITEID and !is_enrolled($context, $user, '', true)) {
 +            if ($course->id != SITEID and !can_access_course($course, $user, '', true)) {
                  throw new moodle_exception('notenrolledprofile');
              }
          }
Simple merge