From 022448e76000f509f2499241e25918fe6907014f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Rosa?= Date: Fri, 19 May 2023 15:57:06 +0100 Subject: [PATCH] Fix where clause when fetching user - When fetching a user, "id" was being used instead of ID_KEY. This leads to problems if the user database has a different column name for id --- src/Auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth.php b/src/Auth.php index 6cad27c..4fe16af 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -454,7 +454,7 @@ public static function user(array $hidden = []) return null; } - $user = static::$db->select($table)->where('id', static::id())->fetchAssoc(); + $user = static::$db->select($table)->where(static::$settings['ID_KEY'], static::id())->fetchAssoc(); if (count($hidden) > 0) { foreach ($hidden as $item) {