diff --git a/_ajax/update_presence.php b/_ajax/update_presence.php index 94e2b7d..933e733 100644 --- a/_ajax/update_presence.php +++ b/_ajax/update_presence.php @@ -16,7 +16,7 @@ if (!$sql->num_of_rows($check_query) && $_POST['checked'] == "false") { $sql->insert_into('presence', array('pr_user_kid_uk_id' => $_POST['user_id'], 'pr_training_tr_id' => $_POST['tr_id'])); log::register('new_presence', 'Edzés: ' . $_POST['tr_id'] . ', gyerek: ' . $_POST['user_id'], null, $_POST['admin_id']); - if ($_POST['credited']) { + if ($_POST['credited'] == 'true') { $sql->update_table('user_kid', array('uk_credit' => $_POST['credit'] + 1), array('uk_id' => $_POST['user_id'])); } }