From 718f72c42da19784f0d4c3eeb7fc4555b81d8d9e Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 18 Mar 2020 17:35:38 +0000 Subject: [PATCH] case-insensitive username search --- ext/log_db/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/log_db/main.php b/ext/log_db/main.php index 023d525d..b3d16e51 100644 --- a/ext/log_db/main.php +++ b/ext/log_db/main.php @@ -47,7 +47,7 @@ class ActorColumn extends Column $driver = $this->table->db->getAttribute(PDO::ATTR_DRIVER_NAME); switch ($driver) { case "pgsql": - return "((username = :{$this->name}_0) OR (address && cast(:{$this->name}_1 as inet)))"; + return "((LOWER(username) = LOWER(:{$this->name}_0)) OR (address && cast(:{$this->name}_1 as inet)))"; default: return "((username = :{$this->name}_0) OR (address = :{$this->name}_1))"; }