mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-03-04 12:29:19 +01:00
with postgres the bool active is returned as a php bool
that's casted to a string gives 1 when true and empty string when false.. cast to an int to get 1 and 0.
This commit is contained in:
parent
dfbe5a0ddf
commit
77b9560710
@ -24,7 +24,7 @@ if (!$db->connect()) {
|
|||||||
$result = $db->customQuery("select id, active, created, secret, email, notes, otp from clients order by id");
|
$result = $db->customQuery("select id, active, created, secret, email, notes, otp from clients order by id");
|
||||||
while($row = $result->fetch(PDO::FETCH_ASSOC)){
|
while($row = $result->fetch(PDO::FETCH_ASSOC)){
|
||||||
echo $row['id'] .
|
echo $row['id'] .
|
||||||
"\t" . $row['active'] .
|
"\t" . (int)$row['active'] .
|
||||||
"\t" . $row['created'] .
|
"\t" . $row['created'] .
|
||||||
"\t" . $row['secret'] .
|
"\t" . $row['secret'] .
|
||||||
"\t" . $row['email'] .
|
"\t" . $row['email'] .
|
||||||
|
@ -23,7 +23,7 @@ if (!$db->connect()) {
|
|||||||
|
|
||||||
$result=$db->customQuery("SELECT active, created, modified, yk_publicname, yk_counter, yk_use, yk_low, yk_high, nonce, notes FROM yubikeys ORDER BY yk_publicname");
|
$result=$db->customQuery("SELECT active, created, modified, yk_publicname, yk_counter, yk_use, yk_low, yk_high, nonce, notes FROM yubikeys ORDER BY yk_publicname");
|
||||||
while($row = $result->fetch(PDO::FETCH_ASSOC)){
|
while($row = $result->fetch(PDO::FETCH_ASSOC)){
|
||||||
echo $row['active'] .
|
echo (int)$row['active'] .
|
||||||
"\t" . $row['created'] .
|
"\t" . $row['created'] .
|
||||||
"\t" . $row['modified'] .
|
"\t" . $row['modified'] .
|
||||||
"\t" . $row['yk_publicname'] .
|
"\t" . $row['yk_publicname'] .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user