Пример #1
0
 public bool AddUser(AppUser user)
 {
     try
     {
         lock (x)
         {
             bool retVal = manager.AddUser(user);
             log.LogMessage(LOG_TYPE.INFO, "Add User executed succesfuly.");
             return(retVal);
         }
     }
     catch
     {
         log.LogMessage(LOG_TYPE.ERROR, "Add User executed unsuccesfuly.");
         return(false);
     }
 }
Пример #2
0
        public void AddUser(string email, string pword, string name, string phone, string address, string zipcode, string age)
        {
            var  salt = crypto.GenerateSaltString();
            User user = new User
            {
                Email   = email,
                Salt    = salt,
                PWord   = crypto.HashPassword(pword, salt),
                Name    = name,
                Phone   = phone,
                Address = address,
                Zipcode = zipcode,
                Age     = age
            };

            userDb.AddUser(user);
        }