From 8a2c32080f2e71e4f0721ed586cbeca89b710ed5 Mon Sep 17 00:00:00 2001 From: Joseph Snyder Date: Wed, 8 Jan 2025 10:10:18 -0500 Subject: [PATCH] Fix AuthTokenUtil SQL query (#2656) In #2614, the `user` table was renamed to `users`. Update the SQL query used in the AuthTokenUtil to use the new table instead of the old name. Fixes: #2655 --- app/Utils/AuthTokenUtil.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Utils/AuthTokenUtil.php b/app/Utils/AuthTokenUtil.php index 1a27b70ee2..c9cfb65609 100644 --- a/app/Utils/AuthTokenUtil.php +++ b/app/Utils/AuthTokenUtil.php @@ -221,9 +221,9 @@ public static function getTokensForUser(int $user_id): Collection */ public static function getAllTokens(): Collection { - return AuthToken::select('authtoken.*', 'project.name AS projectname', 'user.firstname AS owner_firstname', 'user.lastname AS owner_lastname') + return AuthToken::select('authtoken.*', 'project.name AS projectname', 'users.firstname AS owner_firstname', 'users.lastname AS owner_lastname') ->leftJoin('project', 'project.id', '=', 'authtoken.projectid') - ->leftJoin('users', 'user.id', '=', 'authtoken.userid') + ->leftJoin('users', 'users.id', '=', 'authtoken.userid') ->get(); }