exists()) { $pin = $database->get("accounts", "pin", ["uid" => $user->getUID()]); } else { sendJsonResp($Strings->get("login incorrect", false), "ERROR"); } if (is_null($pin) || $pin == "") { exitWithJson(["status" => "ERROR", "pinvalid" => false, "nopinset" => true]); } exitWithJson(["status" => "OK", "pinvalid" => ($pin == $VARS['pin'])]);