protected function processFormData(WebRequest $request, Response $response, User $user)
    {
        $result = $this->layout->validateFormData($request, $response, function ($formValues) use ($user) {
            return $this->validateData(
                $user, 
                $formValues['required-data.username'],
                $formValues['required-data.password'],
                $formValues['required-data.password-confirmed']
            );
        });
        
        if ($result == Form::DATA_VALID) {
            $result = $this->saveUser($request, $user);
        }
        
        return $result;
    }