public MembershipCreateStatus CreateUser(string userName, string fullName, string password, string email, UserRole role) { ValidationUtil.ValidateRequiredStringValue(userName, "userName"); ValidationUtil.ValidateRequiredStringValue(password, "password"); ValidationUtil.ValidateRequiredStringValue(email, "email"); var newUser = new User { UserId = userName, FullName = fullName, Password = HashToBase64(password), PasswordIsHashed = true, Role = role, EmailAddress = email }; bool success = _userRepository.CreateOrUpdateUser(newUser); return success ? MembershipCreateStatus.Success : MembershipCreateStatus.UserRejected; }
public void CreateUser(User user) { CreateUser(user.UserId, user.FullName, user.Password, user.EmailAddress, user.Role); }
public bool CreateOrUpdateUser(User user) { CUDQuery query = session => session.SaveOrUpdate(user); return QueryExecutor.UpdateDelete(query); }