             }
             
             if let password = data.password {
+                #warning("Test password is hashed")
                 let hasher = try req.make(PasswordHasher.self)
                 user.password = try hasher.hash(password)
             }

        return userRepository.save(newUser, on: req).map { _ in
            return req.redirect(to: self.pathCreator.createPath(for: "admin"))
        }
        
        //
        //        let (createUserRawErrors, passwordRawError, confirmPasswordRawError) = validateUserSaveDataExists(edit: false, name: rawName, username: rawUsername, password: rawPassword, confirmPassword: rawConfirmPassword, profilePicture: profilePicture)
        //
        //        // Return if we have any missing fields
        //        if !(createUserRawErrors?.isEmpty ?? true) {
        //            return try viewFactory.createUserView(editing: false, errors: createUserRawErrors, name: rawName, username: rawUsername, passwordError: passwordRawError, confirmPasswordError: confirmPasswordRawError, resetPasswordRequired: resetPasswordRequired, userId: nil, profilePicture: profilePicture, twitterHandle: twitterHandle, biography: biography, tagline: tagline, loggedInUser: request.user())
        //        }
        //
        //        let (createUserErrors, passwordError, confirmPasswordError) = validateUserSaveData(edit: false, name: name, username: username, password: password, confirmPassword: confirmPassword)
        //
        //        if !(createUserErrors?.isEmpty ?? true) {
        //            return try viewFactory.createUserView(editing: false, errors: createUserErrors, name: name, username: username, passwordError: passwordError, confirmPasswordError: confirmPasswordError, resetPasswordRequired: resetPasswordRequired, userId: nil, profilePicture: profilePicture, twitterHandle: twitterHandle, biography: biography, tagline: tagline, loggedInUser: request.user())
        //        }
        //
        //        // We now have valid data
        //        let hashedPassword = try BlogUser.passwordHasher.make(password)
        //        let newUser = BlogUser(name: name, username: username.lowercased(), password: hashedPassword, profilePicture: profilePicture, twitterHandle: twitterHandle, biography: biography, tagline: tagline)
    }
    
    func editUserHandler(_ req: Request) throws -> Future<View> {

            let userRepository = try req.make(BlogUserRepository.self)
            return userRepository.save(user, on: req).transform(to: redirect)
        }
    }
    

