Beispiel #1
0
        public async Task <IList <ISiteUser> > GetUsersForClaim(
            int siteId,
            string claimType,
            string claimValue)
        {
            IList <ISiteUser> users = new List <ISiteUser>();

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(siteId, claimType, claimValue))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);
                }
            }

            return(users);
        }
Beispiel #2
0
        public async Task <IList <ISiteUser> > GetUsersForClaim(
            int siteId,
            string claimType,
            string claimValue,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            IList <ISiteUser> users = new List <ISiteUser>();

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(siteId, claimType, claimValue))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);
                }
            }

            return(users);
        }
Beispiel #3
0
        public async Task <IList <ISiteUser> > GetUsersForClaim(
            int siteId,
            string claimType,
            string claimValue)
        {
            IList <ISiteUser> users = new List <ISiteUser>();

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

            using (DbDataReader reader = await dbUserClaims.GetUsersByClaim(siteId, claimType, claimValue))
            {
                while (reader.Read())
                {
                    SiteUser user = new SiteUser();
                    user.LoadFromReader(reader);
                    users.Add(user);
                }
            }

            return(users);
        }