# File lib/openshift-origin-controller/lib/openshift/mongo_data_store.rb, line 65
    def find_all_logins(opts)
      Rails.logger.debug "MongoDataStore.find_all_logins()\n\n"
      query = {}
      if opts
        if opts[:with_gears]
          query["apps.group_instances.gears.0"] = {"$exists" => true}
        end
        if opts[:with_usage]
          query["usage_records.0"] = {"$exists" => true}
        end
        if opts[:with_plan]
          query["$or"] = [{"pending_plan_id" => {"$ne" => nil}}, {"plan_id" => {"$ne" => nil}}]
        end
      end
      mcursor = user_collection.find(query, {:fields => []})
      ret = []
      mcursor.each do |hash|
        ret.push(hash['_id'])
      end
      ret
    end