dbprovider/mongodb/user.go
func (m MongoDb) Users(filter interface{}) (us []models.User, e error) {
	c := m.Connect(models.COLL_NAME_USER)
	defer m.Close(c)

	err := c.Find(filter).All(&us)
	if err != nil {
		logger.Get().Error("Error getting record from DB. error: %v", err)
		return us, mkmgoerror(err.Error())
	}
	return us, nil
}
func (m MongoDb) Users(filter interface{}) (us []models.User, e error) {
	c := m.Connect(models.COLL_NAME_USER)
	defer m.Close(c)

	err := c.Find(filter).All(&us)
	if err != nil {
		logger.Get().Error("Error getting record from DB. error: %v", err)
		return us, mkmgoerror(err.Error())
	}
	return us, nil
}
// Users returns a slice of all users.