Commit b0639b78 authored by skodak's avatar skodak
Browse files

MDL-15801 fixed incorrect use of get complete user data function; merged from MOODLE_19_STABLE

parent 1aee8c7e
......@@ -43,7 +43,7 @@ if (empty($userid)) {
require_capability('moodle/grade:viewall', $context);
} else {
if (!get_complete_user_data('id', $userid) or isguestuser($userid)) {
if (!$DB->get_record('user', array('id'=>$userid, 'deleted'=>0)) or isguestuser($userid)) {
error("Incorrect userid");
}
}
......
......@@ -43,7 +43,7 @@ if (empty($userid)) {
require_capability('moodle/grade:viewall', $context);
} else {
if (!get_complete_user_data('id', $userid) or isguestuser($userid)) {
if (!$DB->get_record('user', array('id'=>$userid, 'deleted'=>0)) or isguestuser($userid)) {
print_error('invaliduser');
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment