From 209b0bc8117bbd3afc82b50eab4f30d82a3498d0 Mon Sep 17 00:00:00 2001 From: pine3ree Date: Mon, 23 Oct 2023 03:35:43 +0200 Subject: [PATCH 1/2] Fix boolean literal TRUE in docs Signed-off-by: pine3ree --- docs/book/adapter/dbtable/credential-treatment.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/book/adapter/dbtable/credential-treatment.md b/docs/book/adapter/dbtable/credential-treatment.md index 31879f1a..66c933ed 100644 --- a/docs/book/adapter/dbtable/credential-treatment.md +++ b/docs/book/adapter/dbtable/credential-treatment.md @@ -234,13 +234,13 @@ they have followed a verification process. ```php use Laminas\Authentication\Adapter\DbTable\CredentialTreatmentAdapter as AuthAdapter; -// The active field value of an account is equal to "TRUE" +// The active field value of an account is equal to the sql boolean literal TRUE $adapter = new AuthAdapter( $db, 'users', 'username', 'password', - 'PASSWORD(?) AND active = "TRUE"' + 'PASSWORD(?) AND active = TRUE' ); ``` @@ -339,7 +339,7 @@ $adapter = new AuthAdapter( // Now retrieve the Select instance and modify it: $select = $adapter->getDbSelect(); -$select->where('active = "TRUE"'); +$select->where('active = TRUE'); // Authenticate; this will include "users.active = TRUE" in the WHERE clause: $adapter->authenticate(); From 8e6c293cffecb54f471f9c3b46bfc806d194e228 Mon Sep 17 00:00:00 2001 From: pine3ree Date: Mon, 23 Oct 2023 03:36:40 +0200 Subject: [PATCH 2/2] Fix boolean literal TRUE Signed-off-by: pine3ree --- docs/book/adapter/dbtable/callback-check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/adapter/dbtable/callback-check.md b/docs/book/adapter/dbtable/callback-check.md index d730b110..46e67b8b 100644 --- a/docs/book/adapter/dbtable/callback-check.md +++ b/docs/book/adapter/dbtable/callback-check.md @@ -225,7 +225,7 @@ $adapter = new AuthAdapter( // Now retrieve the Select instance and modify it: $select = $adapter->getDbSelect(); -$select->where('active = "TRUE"'); +$select->where('active = TRUE'); // Authenticate; this will include "users.active = TRUE" in the WHERE clause: $adapter->authenticate();