public AuthStatus RegisterUser(UserRegistrationForm registration) { if (!_passwordManager.IsValidPassphrase(registration.Passphrase)) { return(AuthStatus.InvalidPassword); } var newUser = User.MapFromObject(registration, _passwordManager); var user = newUser.MapToEntity(); user = _userRepository.Add(user); return(AuthStatus.Good); }