Author: truong.le
Date: 2010-01-12 04:36:10 -0500 (Tue, 12 Jan 2010)
New Revision: 1231
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
Log:
GTNPORTAL-246: Error occur when changing an existing e-mail
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-01-12
08:54:10 UTC (rev 1230)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-01-12
09:36:10 UTC (rev 1231)
@@ -135,6 +135,16 @@
}
user.setPassword(pass1x);
}
+
+ //Check if mail address is already used
+ Query query = new Query();
+ query.setEmail(getUIStringInput("email").getValue());
+ if (service.getUserHandler().findUsers(query).getAll().size() > 0)
+ {
+ Object[] args = {username};
+ uiApp.addMessage(new
ApplicationMessage("UIAccountInputSet.msg.email-exist", args));
+ return false;
+ }
service.getUserHandler().saveUser(user, true);
enableChangePassword(false);
return true;
Show replies by date