示例#1
0
        public static MultiSiteUser CreateFromBitplateUser(BitplateUser bitplateUser)
        {
            MultiSiteUser newUser = new MultiSiteUser();

            newUser.Email               = bitplateUser.Email;
            newUser.Password            = bitplateUser.Password;
            newUser.PasswordLastChanged = bitplateUser.PasswordLastChanged;
            newUser.ModifiedDate        = bitplateUser.ModifiedDate;
            newUser.Name          = bitplateUser.Name;
            newUser.ForeName      = bitplateUser.ForeName;
            newUser.NamePrefix    = bitplateUser.NamePrefix;
            newUser.Gender        = bitplateUser.Gender;
            newUser.BirthDate     = bitplateUser.BirthDate;
            newUser.Active        = bitplateUser.Active;
            newUser.DateFrom      = bitplateUser.DateFrom;
            newUser.DateTill      = bitplateUser.DateTill;
            newUser.Address       = bitplateUser.Address;
            newUser.Postalcode    = bitplateUser.Postalcode;
            newUser.City          = bitplateUser.City;
            newUser.Country       = bitplateUser.Country;
            newUser.Telephone     = bitplateUser.Telephone;
            newUser.MessageHeader = bitplateUser.MessageHeader;
            newUser.Theme         = bitplateUser.Theme;
            newUser.Language      = bitplateUser.Language;

            return(newUser);
        }
示例#2
0
        public static MultiSiteUser LoadFromBitplateUser(BitplateUser bitplateUser)
        {
            string        email    = bitplateUser.Email;
            string        password = bitplateUser.Password;
            MultiSiteUser user     = BaseObject.GetFirst <MultiSiteUser>("Email ='" + email + "'");

            return(user);
        }
示例#3
0
        public static MultiSiteUser LoadFromTempKey(string key)
        {
            MultiSiteUser user = BaseObject.GetFirst <MultiSiteUser>("TempLoginKey ='" + key + "'");

            if (user != null)
            {
                //voor de zekerheid: tempkey weer leeg maken
                //user.clearTempKey();

                if (DateTime.Now > user.TempLoginKeyCreateDate.GetValueOrDefault().AddMinutes(TEMPKEYMINUTESVALID))
                {
                    user = null;
                }
            }


            return(user);
        }