Fixes SQL error in card activation
This commit is contained in:
1 parent
9d58c8b1b4
commit
4107b553ac
1 file changed
+1
-1
@@ -24,7 +24,7 @@ if( !function_exists('hash_ldap_password') ) {
|
|||||||
function update_card_with_user($phone, $activation_code, $user_id) {
|
function update_card_with_user($phone, $activation_code, $user_id) {
|
||||||
global $conn;
|
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);
|
$res = $conn->query($sql);
|
||||||
if( DB::isError($res) ) {
|
if( DB::isError($res) ) {
|
||||||
throw new InsideDatabaseException($res->getMessage().". DEBUG: ".$res->getDebugInfo());
|
throw new InsideDatabaseException($res->getMessage().". DEBUG: ".$res->getDebugInfo());
|
||||||
|
|||||||
Reference in new issue
Block a user