예제 #1
0
  @RequestMapping(
      value = {MY_ACCOUNT_FI, MY_ACCOUNT_SV},
      method = POST)
  public String registerPost(Model model, Locale locale) {
    Urls urls = Urls.get(locale);

    // Get or *CREATE* registered user
    userService.currentAsRegisteredUser();
    return contextRelativeRedirect(urls.myAccount());
  }
예제 #2
0
  @RequestMapping(
      value = {MY_ACCOUNT_FI, MY_ACCOUNT_SV},
      method = GET)
  public String registerGet(Model model, Locale locale) {
    Urls urls = Urls.get(locale);
    model.addAttribute(ALT_URI_ATTR, urls.alt().myAccount());

    User user = userService.getUserInRole(Role.AUTHENTICATED);
    model.addAttribute("currentUser", user);
    return Views.REGISTERED_USER;
  }