Skip to content
Snippets Groups Projects
Commit 2d9ab533 authored by Matthew Hodgson's avatar Matthew Hodgson
Browse files

fix SQL when searching all users

parent a7e4ff9c
No related branches found
No related tags found
No related merge requests found
......@@ -641,8 +641,13 @@ class UserDirectoryStore(SQLBaseStore):
"""
if self.hs.config.user_directory_search_all_users:
join_clause = ""
where_clause = "?<>''" # naughty hack to keep the same number of binds
# dummy to keep the number of binds & aliases the same
join_clause = """
LEFT JOIN (
SELECT NULL as user_id WHERE NULL = ?
) AS s USING (user_id)"
"""
where_clause = ""
else:
join_clause = """
LEFT JOIN users_in_public_rooms AS p USING (user_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment