From 54f17d4cec9459fa2c278967eec1bbbfcf15f436 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Mon, 6 Feb 2023 13:31:23 +0100 Subject: [PATCH] Removed private accounts from indexing. --- gymboard-search/src/main/resources/sql/select-users.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gymboard-search/src/main/resources/sql/select-users.sql b/gymboard-search/src/main/resources/sql/select-users.sql index b933eba..37fbbcd 100644 --- a/gymboard-search/src/main/resources/sql/select-users.sql +++ b/gymboard-search/src/main/resources/sql/select-users.sql @@ -3,5 +3,6 @@ SELECT u.email as email, u.name as name FROM auth_user u -WHERE u.activated = TRUE +LEFT JOIN auth_user_preferences p ON u.id = p.user_id +WHERE u.activated = TRUE AND p.account_private = FALSE ORDER BY u.created_at; \ No newline at end of file