Ejemplo n.º 1
0
        public Task <ISiteUser> Fetch(Guid siteId, Guid userId)
        {
            if (_multiTenantOptions.UseRelatedSitesMode)
            {
                siteId = _multiTenantOptions.RelatedSiteId;
            }

            return(_queries.Fetch(siteId, userId, CancellationToken));
        }
Ejemplo n.º 2
0
        public async Task <TUser> FindByIdAsync(string userId, CancellationToken cancellationToken)
        {
            ThrowIfDisposed();
            cancellationToken.ThrowIfCancellationRequested();
            log.LogDebug("FindByIdAsync");

            var userGuid = new Guid(userId);
            var siteGuid = siteSettings.Id;

            if (multiTenantOptions.UseRelatedSitesMode)
            {
                siteGuid = multiTenantOptions.RelatedSiteId;
            }

            var siteUser = await queries.Fetch(siteGuid, userGuid, cancellationToken);

            return((TUser)siteUser);
        }