List of usage examples for com.liferay.portal.kernel.util PropsKeys COMPANY_SECURITY_SEND_PASSWORD
String COMPANY_SECURITY_SEND_PASSWORD
To view the source code for com.liferay.portal.kernel.util PropsKeys COMPANY_SECURITY_SEND_PASSWORD.
Click Source Link
From source file:com.liferay.login.web.internal.portlet.action.ForgotPasswordMVCActionCommand.java
License:Open Source License
@Override protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); Company company = themeDisplay.getCompany(); if (!company.isSendPassword() && !company.isSendPasswordResetLink()) { throw new PrincipalException.MustBeEnabled(company.getCompanyId(), PropsKeys.COMPANY_SECURITY_SEND_PASSWORD, PropsKeys.COMPANY_SECURITY_SEND_PASSWORD_RESET_LINK); }/*from w w w . ja v a2 s . c o m*/ try { if (PropsValues.USERS_REMINDER_QUERIES_ENABLED) { checkReminderQueries(actionRequest, actionResponse); } else { checkCaptcha(actionRequest); sendPassword(actionRequest, actionResponse); } } catch (Exception e) { if (e instanceof CaptchaConfigurationException || e instanceof CaptchaTextException || e instanceof UserEmailAddressException) { SessionErrors.add(actionRequest, e.getClass()); } else if (e instanceof NoSuchUserException || e instanceof RequiredReminderQueryException || e instanceof SendPasswordException || e instanceof UserActiveException || e instanceof UserLockoutException || e instanceof UserReminderQueryException) { if (PropsValues.LOGIN_SECURE_FORGOT_PASSWORD) { sendRedirect(actionRequest, actionResponse, null); } else { SessionErrors.add(actionRequest, e.getClass(), e); } } else { _portal.sendError(e, actionRequest, actionResponse); } } }