scout/adapter/mongo/user.py
def users(self, institute=None):
        """Return all users from the database
        
            Args:
                institute(str): A institute_id
        
            Returns:
                res(pymongo.Cursor): A cursor with users
        """
        query = {}
        if institute:
            LOG.info("Fetching all users from institute %s", institute)
            query = {'institutes': {'$in': [institute]}}
        else:
            LOG.info("Fetching all users")
            
        res = self.user_collection.find(query)
        return res
def users(self, institute=None):
        """Return all users from the database
        
            Args:
                institute(str): A institute_id
        
            Returns:
                res(pymongo.Cursor): A cursor with users
        """
        query = {}
        if institute:
            LOG.info("Fetching all users from institute %s", institute)
            query = {'institutes': {'$in': [institute]}}
        else:
            LOG.info("Fetching all users")
            
        res = self.user_collection.find(query)
        return res
Return all users from the database
        
            Args:
                institute(str): A institute_id
        
            Returns:
                res(pymongo.Cursor): A cursor with users