aboutsummaryrefslogtreecommitdiff
path: root/userapi/storage/accounts/sqlite3/storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'userapi/storage/accounts/sqlite3/storage.go')
-rw-r--r--userapi/storage/accounts/sqlite3/storage.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/userapi/storage/accounts/sqlite3/storage.go b/userapi/storage/accounts/sqlite3/storage.go
index 2d09090f..72239014 100644
--- a/userapi/storage/accounts/sqlite3/storage.go
+++ b/userapi/storage/accounts/sqlite3/storage.go
@@ -343,3 +343,10 @@ func (d *Database) GetAccountByLocalpart(ctx context.Context, localpart string,
) (*api.Account, error) {
return d.accounts.selectAccountByLocalpart(ctx, localpart)
}
+
+// SearchProfiles returns all profiles where the provided localpart or display name
+// match any part of the profiles in the database.
+func (d *Database) SearchProfiles(ctx context.Context, searchString string, limit int,
+) ([]authtypes.Profile, error) {
+ return d.profiles.selectProfilesBySearch(ctx, searchString, limit)
+}