Skip to content

Commit

Permalink
fix buf in user_delete_response() (#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
semteacher committed Oct 17, 2024
1 parent 86483db commit 51cfb33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/booking_option.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,11 @@ public function user_delete_response($userid, $cancelreservation = false,
$syncwaitinglist = false;
}

// Delete only incompleted booked options.
// Delete all booked options including completed.
$conditions = ['userid' => $userid, 'optionid' => $this->optionid];
if ($deleteall === false) {
// Delete all booked options including completed.
$conditions[] = ['completed' => 0];
// Delete only incompleted booked options.
$conditions['completed'] = 0;
}
$results = $DB->get_records('booking_answers', $conditions);

Expand Down

0 comments on commit 51cfb33

Please sign in to comment.