|
|
@@ -687,11 +687,12 @@ public class UserApiController extends BaseApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "process"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (StringUtils.isBlank(verificationCode)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
if (STEP_ONE.equals(userIdentity.getProcess())) {
|
|
|
+ if (StringUtils.isBlank(verificationCode)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (!VerifyCodeUtils.verifyCode(verificationCode)) {
|
|
|
res.getError().add(buildError(ErrorConstants.VCODE_ERROR));
|
|
|
return res;
|
|
|
@@ -762,11 +763,12 @@ public class UserApiController extends BaseApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "process"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (StringUtils.isBlank(verificationCode)) {
|
|
|
- res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
if (STEP_ONE.equals(orgIdentity.getProcess())) {
|
|
|
+ if (StringUtils.isBlank(verificationCode)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)) {
|
|
|
res.getError().add(buildError(ErrorConstants.VCODE_ERROR));
|
|
|
return res;
|