예제 #1
0
  @RequestMapping(value = "/user/register", method = RequestMethod.GET)
  public String registrationForm(WebRequest request, Model model) {
    LOGGER.debug("Rendering registration page.");

    Connection<?> connection = providerSignInUtils.getConnectionFromSession(request);

    RegistrationForm regForm;

    if (connection != null) {
      LOGGER.debug("Registration form.");

      UserProfile up = connection.fetchUserProfile();

      regForm = RegistrationForm.fromProviderUser(up);
    } else {
      LOGGER.debug("Empty registration form.");
      regForm = new RegistrationForm();
    }

    model.addAttribute("registrationForm", regForm);

    return "signup";
  }