Author: hoang_to
Date: 2011-06-09 06:05:17 -0400 (Thu, 09 Jun 2011)
New Revision: 6616
Modified:
portal/branches/branch-GTNPORTAL-1921/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
Log:
GTNPORTAL-1893: Update Java code to not store tokenID in a static variable of
UIResetPassword class
Modified:
portal/branches/branch-GTNPORTAL-1921/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1921/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2011-06-09
03:20:55 UTC (rev 6615)
+++
portal/branches/branch-GTNPORTAL-1921/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2011-06-09
10:05:17 UTC (rev 6616)
@@ -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,7 +118,7 @@
setPassword = false;
}
- Token token = tokenService.getToken(tokenId);
+ Token token = tokenService.getToken(uiForm.getTokenId());
// Making sure a token exist
if (token == null || token.isExpired())
{
@@ -129,7 +134,7 @@
uiMaskWorkspace.setWindowSize(-1, -1);
uiApp.addMessage(new
ApplicationMessage("UIResetPassword.msg.change-password-successfully", null));
- tokenService.deleteToken(tokenId);
+ tokenService.deleteToken(uiForm.getTokenId());
}
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}