Author: theute
Date: 2011-11-29 04:59:33 -0500 (Tue, 29 Nov 2011)
New Revision: 8156
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
Log:
JBEPP-1214: password change by 'forgot your password' link from email throws an
error
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2011-11-29
04:00:25 UTC (rev 8155)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2011-11-29
09:59:33 UTC (rev 8156)
@@ -58,7 +58,7 @@
static User user_;
- private static String tokenId;
+ private String tokenId;
public UIResetPassword() throws Exception
{
@@ -79,9 +79,14 @@
public void setTokenId(String tokenId)
{
- UIResetPassword.tokenId = tokenId;
+ this.tokenId = tokenId;
}
+ public String getTokenId()
+ {
+ return this.tokenId;
+ }
+
@Override
public void reset()
{
@@ -113,8 +118,7 @@
setPassword = false;
}
- Token token = tokenService.getToken(tokenId);
- // Making sure a token exist
+ Token token = tokenService.deleteToken(uiForm.getTokenId());
if (token == null || token.isExpired())
{
uiApp.addMessage(new
ApplicationMessage("UIForgetPassword.msg.expration", null));
@@ -128,11 +132,10 @@
uiMaskWorkspace.setUIComponent(null);
uiMaskWorkspace.setWindowSize(-1, -1);
uiApp.addMessage(new
ApplicationMessage("UIResetPassword.msg.change-password-successfully", null));
-
- tokenService.deleteToken(tokenId);
}
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}
}
+
Show replies by date