summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 11a915055..07a801dc6 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -793,6 +793,27 @@ func (us SqlUserStore) GetByAuth(authData *string, authService string) StoreChan
return storeChannel
}
+func (us SqlUserStore) GetAllUsingAuthService(authService string) StoreChannel {
+
+ storeChannel := make(StoreChannel)
+
+ go func() {
+ result := StoreResult{}
+ var data []*model.User
+
+ if _, err := us.GetReplica().Select(&data, "SELECT * FROM Users WHERE AuthService = :AuthService", map[string]interface{}{"AuthService": authService}); err != nil {
+ result.Err = model.NewLocAppError("SqlUserStore.GetByAuth", "store.sql_user.get_by_auth.other.app_error", nil, "authService="+authService+", "+err.Error())
+ }
+
+ result.Data = data
+
+ storeChannel <- result
+ close(storeChannel)
+ }()
+
+ return storeChannel
+}
+
func (us SqlUserStore) GetByUsername(username string) StoreChannel {
storeChannel := make(StoreChannel)