Examples of ResetPasswordForm


Examples of cn.edu.zju.acm.onlinejudge.form.ResetPasswordForm

     *             any errors happened
     */
    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, ContextAdapter context) throws Exception {

        ResetPasswordForm passwordForm = (ResetPasswordForm) form;
        String code = passwordForm.getCode();

        UserPersistence userPersistence = PersistenceManager.getInstance().getUserPersistence();
        UserProfile user = null;
        if (code != null && code.trim().length() > 0) {
            user = userPersistence.getUserProfileByCode(code);
        }

        if (user == null) {
            ActionMessages messages = new ActionMessages();
            messages.add("message", new ActionMessage("onlinejudge.resetPassword.invalidCode"));
            this.saveErrors(context.getRequest(), messages);
            return this.handleSuccess(mapping, context, "message");

        }

        if (passwordForm.getPassword() == null) {
            return this.handleSuccess(mapping, context, "failure");
        }

        user.setPassword(passwordForm.getPassword());
        userPersistence.updateUserProfile(user, user.getId());
        userPersistence.deleteConfirmCode(user.getId(), user.getId());

        ActionMessages messages = new ActionMessages();
        messages.add("message", new ActionMessage("onlinejudge.resetPassword.success"));
View Full Code Here

Examples of org.broadleafcommerce.openadmin.web.form.ResetPasswordForm

        return getResetPasswordView();
    }

    @ModelAttribute("resetPasswordForm")
    public ResetPasswordForm initResetPasswordForm(HttpServletRequest request) {
        ResetPasswordForm resetPasswordForm = new ResetPasswordForm();
        String username = (String) request.getSession(true).getAttribute("forgot_password_username");
        String token = request.getParameter("token");
        resetPasswordForm.setToken(token);
        resetPasswordForm.setUsername(username);
        return resetPasswordForm;
    }
View Full Code Here

Examples of org.hoteia.qalingo.web.mvc.form.ResetPasswordForm

  /**
   *
   */
    @ModelAttribute("resetPasswordForm")
  protected ResetPasswordForm getResetPasswordForm(final HttpServletRequest request, final Model model) throws Exception {
      ResetPasswordForm resetPasswordForm = new ResetPasswordForm();
    String token = request.getParameter(RequestConstants.REQUEST_PARAMETER_PASSWORD_RESET_TOKEN);
    resetPasswordForm.setToken(token);
    String email = request.getParameter(RequestConstants.REQUEST_PARAMETER_PASSWORD_RESET_EMAIL);
    resetPasswordForm.setEmail(email);
      return resetPasswordForm;
  }
View Full Code Here

Examples of org.sete.web.form.admin.ResetPasswordForm

                              HttpServletRequest request,
                              HttpServletResponse response) throws Exception {

        doAuthorization(request);

    ResetPasswordForm rpForm = (ResetPasswordForm)form;
    SeteUserProfileService service = getService(SeteUserProfileService.class);
    service.resetPassword(getAuthenticatedUser(request), rpForm.getNewPasswordConfirm());

        createSuccessMessage(request);

        return mapping.findForward(WebConstants.FORWARD_VIEW);
  }
View Full Code Here

Examples of org.sete.web.form.admin.ResetPasswordForm

                              HttpServletRequest request,
                              HttpServletResponse response) throws Exception {

        doAuthorization(request);

    ResetPasswordForm rpForm = (ResetPasswordForm)form;
    SeteUserProfileService service = getService(SeteUserProfileService.class);
    service.resetPassword(getAuthenticatedUser(request), rpForm.getNewPasswordConfirm());

        createSuccessMessage(request);

        return mapping.findForward("view");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.