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