summaryrefslogtreecommitdiffstats
path: root/store/sql_user_store.go
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-09-09 10:56:48 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-09-09 10:56:48 +0500
commitc7692a800ef43b63866b6f470b72eb1c3816484f (patch)
tree801314957491080f83789335f64fb979292529d9 /store/sql_user_store.go
parent8c9c6de97041f8b2d646a7b4f03852c74e8e8fab (diff)
parent64d4890a4109618b383f7cfe1acc541bd72a0899 (diff)
downloadchat-c7692a800ef43b63866b6f470b72eb1c3816484f.tar.gz
chat-c7692a800ef43b63866b6f470b72eb1c3816484f.tar.bz2
chat-c7692a800ef43b63866b6f470b72eb1c3816484f.zip
Merge branch 'master' of https://github.com/mattermost/platform into ui-changes
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r--store/sql_user_store.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 64a18545a..be1d29df0 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -452,3 +452,30 @@ func (us SqlUserStore) VerifyEmail(userId string) StoreChannel {
return storeChannel
}
+
+func (us SqlUserStore) GetForExport(teamId string) StoreChannel {
+
+ storeChannel := make(StoreChannel)
+
+ go func() {
+ result := StoreResult{}
+
+ var users []*model.User
+
+ if _, err := us.GetReplica().Select(&users, "SELECT * FROM Users WHERE TeamId = :TeamId", map[string]interface{}{"TeamId": teamId}); err != nil {
+ result.Err = model.NewAppError("SqlUserStore.GetProfiles", "We encounted an error while finding user profiles", err.Error())
+ } else {
+ for _, u := range users {
+ u.Password = ""
+ u.AuthData = ""
+ }
+
+ result.Data = users
+ }
+
+ storeChannel <- result
+ close(storeChannel)
+ }()
+
+ return storeChannel
+}