public Task <ISiteUser> Fetch(Guid siteId, Guid userId) { if (_multiTenantOptions.UseRelatedSitesMode) { siteId = _multiTenantOptions.RelatedSiteId; } return(_queries.Fetch(siteId, userId, CancellationToken)); }
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); }