Skip to content
Snippets Groups Projects
Commit 78b8ffba authored by srosse's avatar srosse
Browse files

OO-3284: don't show error in change password workflow

parent c67eb427
No related branches found
No related tags found
No related merge requests found
......@@ -216,9 +216,8 @@ public class PwChangeController extends BasicController {
sendEmail(ureq, identity);
}
} else {
// no user exists, this is an error in the pwchange page
// REVIEW:pb:2009-11-23:gw, setter should not be necessary. -> check the error already in th emailOrUsernameCtr
emailOrUsernameCtr.setUserNotIdentifiedError();
logWarn("Failed to identify user in password change workflow: " + emailOrUsername, null);
stepSendEmailConfiration();
}
}
......@@ -256,7 +255,7 @@ public class PwChangeController extends BasicController {
String emailAdress = identity.getUser().getProperty(UserConstants.EMAIL, locale);
if (!StringHelper.containsNonWhitespace(emailAdress)) {
emailOrUsernameCtr.setUserNotIdentifiedError();
stepSendEmailConfiration();//for security reason, don't show an error, go simply to the next step
return null;
}
......@@ -290,16 +289,20 @@ public class PwChangeController extends BasicController {
MailerResult result = mailManager.sendExternMessage(bundle, null, false);
if(result.getReturnCode() == MailerResult.OK) {
getWindowControl().setInfo(translate("email.sent"));
// prepare next step
wic.setCurStep(2);
myContent.contextPut("text", translate("step2.pw.text"));
emailOrUsernameCtr.getInitialComponent().setVisible(false);
} else {
showError("email.notsent");
}
stepSendEmailConfiration();
return tk;
}
/**
* Activate the step 2
*/
private void stepSendEmailConfiration() {
wic.setCurStep(2);
myContent.contextPut("text", translate("step2.pw.text"));
emailOrUsernameCtr.getInitialComponent().setVisible(false);
}
/**
* Look for user in "Person" and "user" tables. Fist search by user name
* and if the user cannot be found, search by email address.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment