imports/vx/both/code/util.js
/**
     * Find the non-retired users in the specified tenant.
     *
     * @param {string} tenantId Tenant ID.
     * @param {string} includeRetiredUsers True to include retired users.
     * @param {string} includeRetiredDomains True to include inactive domains.
     * @param {string} domainIdIgnore Optional domain ID to be ignored.
     * @return {array} Cursor of users in the tenant.
     */
Find the non-retired users in the specified tenant.
@param {string} tenantId Tenant ID.
@param {string} includeRetiredUsers True to include retired users.
@param {string} includeRetiredDomains True to include inactive domains.
@param {string} domainIdIgnore Optional domain ID to be ignored.
@return {array} Cursor of users in the tenant.
Find the non - retired users in the specified tenant . @param { string } tenantId Tenant ID . @param { string } includeRetiredUsers True to include retired users . @param { string } includeRetiredDomains True to include inactive domains . @param { string } domainIdIgnore Optional domain ID to be ignored . @return { array } Cursor of users in the tenant .
findUsersInTenant(tenantId, includeRetiredUsers, includeRetiredDomains, domainIdIgnore) {
        let domainIds = Util.getDomainIdsOfTenant(tenantId, includeRetiredDomains)
        if (domainIdIgnore) {
            domainIds = _.without(domainIds, domainIdIgnore)
        }
        let criteria = {}
        criteria["profile.domains"] = { $elemMatch: { domainId: { $in: domainIds } } }
        if (!includeRetiredUsers) {
            criteria["profile.dateRetired"] = { $exists:false }
        }
        return Meteor.users.find(criteria).fetch()
    }
findUsersInTenant ( tenantId , includeRetiredUsers , includeRetiredDomains , domainIdIgnore ) { let domainIds = Util . getDomainIdsOfTenant ( tenantId , includeRetiredDomains ) if ( domainIdIgnore ) { domainIds = _ . without ( domainIds , domainIdIgnore ) } let criteria = { } criteria [ "profile.domains" ] = { $elemMatch : { domainId : { $in : domainIds } } } if ( ! includeRetiredUsers ) { criteria [ "profile.dateRetired" ] = { $exists : false } } return Meteor . users . find ( criteria ) . fetch ( ) }
Find the non-retired users in the specified tenant.
Find the non - retired users in the specified tenant .