From 4107b553ace52a4deccf9ecf9d64d58ff30464e7 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Wed, 9 Sep 2015 21:09:02 +0200 Subject: [PATCH] Fixes SQL error in card activation --- snapporder/lib/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapporder/lib/functions.php b/snapporder/lib/functions.php index df438b6..69c3bab 100644 --- a/snapporder/lib/functions.php +++ b/snapporder/lib/functions.php @@ -24,7 +24,7 @@ if( !function_exists('hash_ldap_password') ) { function update_card_with_user($phone, $activation_code, $user_id) { global $conn; - $sql = "UPDATE din_card SET user_id=$user_id,owner_phone_number=NULL WHERE owner_phone_number='$phone' AND card_number=$activation_code"; + $sql = "UPDATE din_card SET user_id=$user_id,owner_phone_number=NULL WHERE owner_phone_number='$phone' AND card_number='$activation_code'"; $res = $conn->query($sql); if( DB::isError($res) ) { throw new InsideDatabaseException($res->getMessage().". DEBUG: ".$res->getDebugInfo());