public MembershipUser CreateUser(string username, string password) { var user = new User { UserName = username, Email = string.Empty, Password = BCrypt.HashPassword(password, BCrypt.GenerateSalt()), CreatedDate = DateTime.Now, IsActivated = false, IsLockedOut = false, LastLockedOutDate = DateTime.Now, LastLoginDate = DateTime.Now }; _collection.Insert(user); return GetUser(username); }
public MembershipUser CreateUserWithHashedPassword(string username, string hashedPassword) { var user = new User { UserName = username, Email = string.Empty, Password = hashedPassword, CreatedDate = DateTime.Now, IsActivated = false, IsLockedOut = false, LastLockedOutDate = DateTime.Now, LastLoginDate = DateTime.Now }; _collection.Insert(user); return GetUser(username); }