diff --git a/modules/apps/login/login-web/src/main/java/com/liferay/login/web/internal/portlet/action/LoginMVCActionCommand.java b/modules/apps/login/login-web/src/main/java/com/liferay/login/web/internal/portlet/action/LoginMVCActionCommand.java
index 048e01f996a5ef49ff403b4cbfef080f4ad2f673..f22606c5f88ff10c7dfac2872a4b6b8f6c0625e8 100644
--- a/modules/apps/login/login-web/src/main/java/com/liferay/login/web/internal/portlet/action/LoginMVCActionCommand.java
+++ b/modules/apps/login/login-web/src/main/java/com/liferay/login/web/internal/portlet/action/LoginMVCActionCommand.java
@@ -15,10 +15,12 @@
 package com.liferay.login.web.internal.portlet.action;
 
 import com.liferay.login.web.internal.constants.LoginPortletKeys;
+import com.liferay.login.web.internal.portlet.util.LoginUtil;
 import com.liferay.portal.kernel.exception.CompanyMaxUsersException;
 import com.liferay.portal.kernel.exception.CookieNotSupportedException;
 import com.liferay.portal.kernel.exception.NoSuchUserException;
 import com.liferay.portal.kernel.exception.PasswordExpiredException;
+import com.liferay.portal.kernel.exception.UserActiveException;
 import com.liferay.portal.kernel.exception.UserEmailAddressException;
 import com.liferay.portal.kernel.exception.UserIdException;
 import com.liferay.portal.kernel.exception.UserLockoutException;
@@ -26,7 +28,10 @@ import com.liferay.portal.kernel.exception.UserPasswordException;
 import com.liferay.portal.kernel.exception.UserScreenNameException;
 import com.liferay.portal.kernel.log.Log;
 import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.model.Company;
+import com.liferay.portal.kernel.model.CompanyConstants;
 import com.liferay.portal.kernel.model.Layout;
+import com.liferay.portal.kernel.model.User;
 import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
 import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
 import com.liferay.portal.kernel.portlet.PortletPreferencesFactoryUtil;
@@ -35,8 +40,10 @@ import com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand;
 import com.liferay.portal.kernel.portlet.bridges.mvc.MVCActionCommand;
 import com.liferay.portal.kernel.security.auth.AuthException;
 import com.liferay.portal.kernel.security.auth.session.AuthenticatedSessionManager;
+import com.liferay.portal.kernel.service.UserLocalService;
 import com.liferay.portal.kernel.servlet.SessionErrors;
 import com.liferay.portal.kernel.theme.ThemeDisplay;
+import com.liferay.portal.kernel.util.GetterUtil;
 import com.liferay.portal.kernel.util.Http;
 import com.liferay.portal.kernel.util.ParamUtil;
 import com.liferay.portal.kernel.util.Portal;
@@ -49,6 +56,7 @@ import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletPreferences;
 import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
 import javax.portlet.PortletURL;
 import javax.portlet.WindowState;
 
@@ -130,16 +138,53 @@ public class LoginMVCActionCommand extends BaseMVCActionCommand {
 
 					SessionErrors.add(actionRequest, e.getClass());
 				}
+
+				postProcessAuthFailure(actionRequest, actionResponse);
+
+				hideDefaultErrorMessage(actionRequest);
+
+				return;
 			}
-			else if (e instanceof CompanyMaxUsersException ||
-					 e instanceof CookieNotSupportedException ||
-					 e instanceof NoSuchUserException ||
-					 e instanceof PasswordExpiredException ||
-					 e instanceof UserEmailAddressException ||
-					 e instanceof UserIdException ||
-					 e instanceof UserLockoutException ||
-					 e instanceof UserPasswordException ||
-					 e instanceof UserScreenNameException) {
+			else if (e instanceof UserLockoutException.PasswordPolicyLockout) {
+				Company company = themeDisplay.getCompany();
+
+				if (!company.isSendPasswordResetLink()) {
+					User user = _getUser(actionRequest);
+
+					PortletPreferences portletPreferences =
+						actionRequest.getPreferences();
+
+					String emailFromName = portletPreferences.getValue(
+						"emailFromName", null);
+					String emailFromAddress = portletPreferences.getValue(
+						"emailFromAddress", null);
+
+					String emailToAddress = user.getEmailAddress();
+
+					LoginUtil.sendPasswordLockout(
+						actionRequest, emailFromName, emailFromAddress,
+						emailToAddress, null, null);
+				}
+
+				SessionErrors.add(
+					actionRequest, e.getClass(), e);
+
+				postProcessAuthFailure(actionRequest, actionResponse);
+
+				hideDefaultErrorMessage(actionRequest);
+
+				return;
+			}
+
+			if (e instanceof CompanyMaxUsersException ||
+				 e instanceof CookieNotSupportedException ||
+				 e instanceof NoSuchUserException ||
+				 e instanceof PasswordExpiredException ||
+				 e instanceof UserEmailAddressException ||
+				 e instanceof UserIdException ||
+				 e instanceof UserLockoutException ||
+				 e instanceof UserPasswordException ||
+				 e instanceof UserScreenNameException) {
 
 				SessionErrors.add(actionRequest, e.getClass(), e);
 			}
@@ -307,6 +352,53 @@ public class LoginMVCActionCommand extends BaseMVCActionCommand {
 		actionResponse.sendRedirect(portletURL.toString());
 	}
 
+	private User _getUser(ActionRequest actionRequest) throws Exception {
+		User user = null;
+
+		ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
+			WebKeys.THEME_DISPLAY);
+
+		PortletPreferences portletPreferences = actionRequest.getPreferences();
+
+		String authType = portletPreferences.getValue("authType", null);
+
+		if (Validator.isNull(authType)) {
+			Company company = themeDisplay.getCompany();
+
+			authType = company.getAuthType();
+		}
+
+		PortletSession portletSession = actionRequest.getPortletSession();
+
+		String login = (String)portletSession.getAttribute(
+			WebKeys.FORGOT_PASSWORD_REMINDER_USER_EMAIL_ADDRESS);
+
+		if (Validator.isNull(login)) {
+			login = ParamUtil.getString(actionRequest, "login");
+		}
+
+		if (authType.equals(CompanyConstants.AUTH_TYPE_EA)) {
+			user = _userLocalService.getUserByEmailAddress(
+				themeDisplay.getCompanyId(), login);
+		}
+		else if (authType.equals(CompanyConstants.AUTH_TYPE_SN)) {
+			user = _userLocalService.getUserByScreenName(
+				themeDisplay.getCompanyId(), login);
+		}
+		else if (authType.equals(CompanyConstants.AUTH_TYPE_ID)) {
+			user = _userLocalService.getUserById(GetterUtil.getLong(login));
+		}
+		else {
+			throw new NoSuchUserException("User does not exist");
+		}
+
+		if (!user.isActive()) {
+			throw new UserActiveException("Inactive user " + user.getUuid());
+		}
+
+		return user;
+	}
+
 	private static final Log _log = LogFactoryUtil.getLog(
 		LoginMVCActionCommand.class);
 
@@ -319,4 +411,7 @@ public class LoginMVCActionCommand extends BaseMVCActionCommand {
 	@Reference
 	private Portal _portal;
 
+	@Reference
+	private UserLocalService _userLocalService;
+
 }
\ No newline at end of file