Skip to content

Commit

Permalink
Fix AuthTokenUtil SQL query (#2656)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
josephsnyder authored Jan 8, 2025
1 parent b81fa57 commit 8a2c320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Utils/AuthTokenUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 8a2c320

Please sign in to comment.