Skip to content

Commit

Permalink
MDL-63137 mod_feedback: discern between user or id better
Browse files Browse the repository at this point in the history
is_int('1') => false, so better we invert the check that is safer.
  • Loading branch information
stronk7 authored and andrewnicols committed Apr 30, 2019
1 parent e24d2a7 commit acc9800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/feedback/lib.php
Expand Up @@ -2556,7 +2556,7 @@ function feedback_send_email($cm, $feedback, $course, $user, $completed = null)
return;
}

if (is_int($user)) {
if (!is_object($user)) {
$user = $DB->get_record('user', array('id' => $user));
}

Expand Down

0 comments on commit acc9800

Please sign in to comment.