Skip to content

Commit

Permalink
MDL-74333 badges: Check profile criteria valid when reviewing
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins authored and junpataleta committed May 4, 2022
1 parent 9478dc6 commit a0f47c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions badges/criteria/award_criteria_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ public function review($userid, $filtered = false) {
$join .= " LEFT JOIN {user_info_data} uid{$idx} ON uid{$idx}.userid = u.id AND uid{$idx}.fieldid = :fieldid{$idx} ";
$sqlparams["fieldid{$idx}"] = $param['field'];
$whereparts[] = "uid{$idx}.id IS NOT NULL";
} else {
// This is a field from {user} table.
} else if (in_array($param['field'], $this->allowed_default_fields)) {
// This is a valid field from {user} table.
if ($param['field'] == 'picture') {
// The picture field is numeric and requires special handling.
$whereparts[] = "u.{$param['field']} != 0";
Expand Down

0 comments on commit a0f47c8

Please sign in to comment.