Skip to content

Commit

Permalink
an empty check would catch null ... while != "" will also match null …
Browse files Browse the repository at this point in the history
…it feels wrong
  • Loading branch information
DavidGoodwin committed Jan 5, 2024
1 parent 0632d39 commit 6e6e430
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/TotpPf.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public function usesTOTP(string $username): bool
];

$result = db_query_one($sql, $values);
if (is_array($result) && isset($result['totp_secret']) && $result['totp_secret'] != '') {

if (is_array($result) && isset($result['totp_secret']) && !empty($result['totp_secret'])) {
return true;
}
return false;
Expand Down

0 comments on commit 6e6e430

Please sign in to comment.