Esempio n. 1
0
 public override System.Web.Profile.ProfileInfoCollection GetAllInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
 {
     pageIndex = pageIndex < 1 ? 1 : pageIndex;
     throw new NotImplementedException();
 }
Esempio n. 2
0
 public override System.Web.Profile.ProfileInfoCollection FindInactiveProfilesByUserName(System.Web.Profile.ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
 {
     pageIndex = pageIndex < 1 ? 0 : pageIndex - 1;
     throw new NotImplementedException();
 }
Esempio n. 3
0
        public override System.Web.Profile.ProfileInfoCollection FindProfilesByUserName(System.Web.Profile.ProfileAuthenticationOption authenticationOption, string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            using (var Entities = Repository)
            {
                pageIndex = pageIndex < 1 ? 1 : pageIndex;
                Guid applicationInstance = Guid.Parse(ApplicationName);
                System.Web.Profile.ProfileInfoCollection profiles = new System.Web.Profile.ProfileInfoCollection();
                var members = Entities.
                              ApplicationInstance_v1_0
                              .Single(i => i.instanceUID == applicationInstance)
                              .Membership_v1_0.Where(m => m.Users_v1_0.email == usernameToMatch && m.Users_v1_0.isAnonymous == (authenticationOption == System.Web.Profile.ProfileAuthenticationOption.Anonymous || authenticationOption == System.Web.Profile.ProfileAuthenticationOption.All));

                totalRecords = members.Count();

                members.Skip((pageIndex - 1) * pageSize)
                .ToList().ForEach(m =>
                {
                    profiles.Add(new System.Web.Profile.ProfileInfo(m.Users_v1_0.email, m.Users_v1_0.isAnonymous, m.Users_v1_0.lastActivityDate.Value, m.Profile_v1_0.Max(p => p.LastUpdatedDate), m.Profile_v1_0.Count()));
                });
                return(profiles);
            }
        }
Esempio n. 4
0
        public override System.Web.Profile.ProfileInfoCollection GetAllInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, DateTime dUserInactiveSinceDate, int iPageIndex, int iPageSize, out int iTotalRecords)
        {
            System.Web.Profile.ProfileInfoCollection oProfileInfoCollection;

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.GetAllInactiveProfiles", this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    oProfileInfoCollection = oGenProfileProviderService.GetAllInactiveProfiles(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, dUserInactiveSinceDate);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }
            return(oProfileInfoCollection);
        }
Esempio n. 5
0
 public override int DeleteInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
        public override System.Web.Profile.ProfileInfoCollection FindProfilesByUserName(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, string sUsernameToMatch, int iPageIndex, int iPageSize, out int iTotalRecords)
        {
            System.Web.Profile.ProfileInfoCollection oProfileInfoCollection;

            Sitecore.Diagnostics.Log.Info("GenProfileProvider.FindProfilesByUserName", this);

            try
            {
                using (var oGenProfileProviderService = new GenProfileProviderServiceProxy())
                {
                    oProfileInfoCollection = oGenProfileProviderService.FindProfilesByUserName(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, sUsernameToMatch);
                }
            }
            catch (Exception oGenProfileProviderException)
            {
                Sitecore.Diagnostics.Log.Error("Genworth Profile Provider Error", oGenProfileProviderException, this);
                throw;
            }
            return(oProfileInfoCollection);
        }
 public int GetNumberOfInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, DateTime dUserInactiveSinceDate)
 {
     return(base.Channel.GetNumberOfInactiveProfiles(oAuthenticationOption, dUserInactiveSinceDate));
 }
 public System.Web.Profile.ProfileInfoCollection GetAllProfiles(out int iTotalRecords, int iPageIndex, int iPageSize, System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption)
 {
     return(base.Channel.GetAllProfiles(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption));
 }
 public System.Web.Profile.ProfileInfoCollection GetAllInactiveProfiles(out int iTotalRecords, int iPageIndex, int iPageSize, System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, DateTime dUserInactiveSinceDate)
 {
     return(base.Channel.GetAllInactiveProfiles(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, dUserInactiveSinceDate));
 }
 public System.Web.Profile.ProfileInfoCollection FindProfilesByUserName(out int iTotalRecords, int iPageIndex, int iPageSize, System.Web.Profile.ProfileAuthenticationOption oAuthenticationOption, string sUsernameToMatch)
 {
     return(base.Channel.FindProfilesByUserName(out iTotalRecords, iPageIndex, iPageSize, oAuthenticationOption, sUsernameToMatch));
 }