Skip to content

Commit aa86f0f

Browse files
authored
fix: user search (#1108)
1 parent a3e8e91 commit aa86f0f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
## [10.0.2]
11+
12+
- Fixes `NullPointerException` in user search API.
13+
1014
## [10.0.1]
1115

1216
- Fixes slow queries for account linking

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" }
1919
// }
2020
//}
2121

22-
version = "10.0.1"
22+
version = "10.0.2"
2323

2424
repositories {
2525
mavenCentral()

src/main/java/io/supertokens/inmemorydb/queries/GeneralQueries.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ public static AuthRecipeUserInfo[] getUsers(Start start, TenantIdentifier tenant
679679
// attach email tags to queries
680680
QUERY = QUERY +
681681
" WHERE (emailpasswordTable.app_id = ? AND emailpasswordTable.tenant_id = ?) AND"
682-
+ " (emailpasswordTable.email LIKE ? OR emailpasswordTable.email LIKE ?)";
682+
+ " ( emailpasswordTable.email LIKE ? OR emailpasswordTable.email LIKE ? ";
683683
queryList.add(tenantIdentifier.getAppId());
684684
queryList.add(tenantIdentifier.getTenantId());
685685
queryList.add(dashboardSearchTags.emails.get(0) + "%");
@@ -690,6 +690,8 @@ public static AuthRecipeUserInfo[] getUsers(Start start, TenantIdentifier tenant
690690
queryList.add("%@" + dashboardSearchTags.emails.get(i) + "%");
691691
}
692692

693+
QUERY += " )";
694+
693695
USER_SEARCH_TAG_CONDITION.append("SELECT * FROM ( ").append(QUERY)
694696
.append(" LIMIT 1000) AS emailpasswordResultTable");
695697
}

0 commit comments

Comments
 (0)