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); } }
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); }