Changeset 7410 for trunk/www/my_base/user/submit_user.jsp
- Timestamp:
- Oct 9, 2017, 1:47:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/my_base/user/submit_user.jsp
r7295 r7410 59 59 String root = request.getContextPath()+"/"; 60 60 61 String forward = null; 61 62 DbControl dc = sc.newDbControl(); 62 63 try … … 77 78 // Contact information tab 78 79 user.setEmail(email); 80 boolean useDeviceVerification = Values.getBoolean(request.getParameter("useDeviceVerification")); 81 if (!useDeviceVerification) user.disableDeviceVerification(); 79 82 if (EmailUtil.isEnabled()) 80 83 { 81 84 user.setSendMessagesAsEmail(email != null && Values.getBoolean(request.getParameter("sendMessagesAsEmail"))); 85 if (useDeviceVerification && !user.getUseDeviceVerification()) 86 { 87 // Send a verification code for verifying the email address 88 forward = "verify_email.jsp?ID="+ID; 89 } 82 90 } 83 91 user.setOrganisation(Values.getStringOrNull(request.getParameter("organisation"))); … … 111 119 sc.setSessionSetting("user", null); 112 120 message = "Information saved"; 121 } 122 else if ("VerifyEmail".equals(cmd)) 123 { 124 String verificationCode = request.getParameter("verificationCode"); 125 User user = (User)sc.getSessionSetting("user"); 126 dc.reattachItem(user, false); 127 user.enableDeviceVerification(verificationCode); 128 message = "The email has been verified"; 129 dc.commit(); 113 130 } 114 131 else if ("SavePreferences".equals(cmd)) … … 204 221 if (dc != null) dc.close(); 205 222 } 206 response.sendRedirect(root + "common/close_popup.jsp?ID="+ID+"&refresh_opener=1&&message="+HTML.urlEncode(message)); 223 224 if (forward != null) 225 { 226 pageContext.forward(forward); 227 } 228 else 229 { 230 response.sendRedirect(root + "common/close_popup.jsp?ID="+ID+"&refresh_opener=1&&message="+HTML.urlEncode(message)); 231 } 207 232 %> 208 233
Note: See TracChangeset
for help on using the changeset viewer.