public override MembershipUser GetUser(string username, bool userIsOnline)
        {
            SSLStoreUser user = null;

            bool AlreadyChecked = false;

            //Attempt to see if User has already being checked during this request
            if (HttpContext.Current.Items.Contains("SSLMEMBERSHIPGETUSER" + this.ApplicationName))
            {
                object o = HttpContext.Current.Items["SSLMEMBERSHIPGETUSER" + this.ApplicationName];
                if (o != null && o is SSLStoreUser)
                {
                    user = (SSLStoreUser)o;
                }
                AlreadyChecked = true;
            }

            if (AlreadyChecked == false)
            {
                repo = DependencyResolver.Current.GetService <IRepository <User> >();
                User usertemp = repo.Find(x => x.Email == username && x.SiteID == siteid && x.RecordStatusID == 1).FirstOrDefault();

                if (usertemp != null && usertemp.ID > 0)
                {
                    user = new SSLStoreUser(usertemp);
                    HttpContext.Current.Items["SSLMEMBERSHIPGETUSER" + this.ApplicationName] = user;
                }
            }
            return(user);
        }
        public override bool Equals(object obj)
        {
            bool result = false;

            if (obj != null && obj is SSLStoreUser)
            {
                SSLStoreUser user = (SSLStoreUser)obj;
                if (user.Details.ID == this.Details.ID)
                {
                    result = true;
                }
            }
            return(result);
        }
        /// <summary>
        /// Compares, Useful in Sorting.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            int result = 0;

            if (obj != null && obj is SSLStoreUser)
            {
                SSLStoreUser user = (SSLStoreUser)obj;
                if (user.Details.ID == this.Details.ID)
                {
                    result = 0;
                }
                else if (user.Details.ID < this.Details.ID)
                {
                    result = 1;
                }
                else
                {
                    result = -1;
                }
            }
            return(result);
        }