currently it is pretty difficult to disable a userlogin by setting the deleted date to a date in the future and enable=N, further when disable a party tries to disable related userlogins but does not set that future date. This change will allow to nullify the deleted date so it is now clear the userlogin will never be enabled. The deleted date is still available in the last modified date.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1142908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2011-07-05 07:18:54 +00:00
parent 6724a6698f
commit cb7b9a6471
2 changed files with 0 additions and 6 deletions
@@ -249,7 +249,6 @@ public class PartyServices {
for(GenericValue userLogin : userLogins) {
if (!"N".equals(userLogin.getString("enabled"))) {
userLogin.set("enabled", "N");
userLogin.set("disabledDateTime", UtilDateTime.nowTimestamp());
userLogin.store();
}
}
@@ -888,11 +888,6 @@ public class LoginServices {
userLoginToUpdate.set("disabledDateTime", null);
}
// if was enabled and we are disabling it, and no disabledDateTime was passed, set it to now
if (wasEnabled && "N".equals(context.get("enabled")) && context.get("disabledDateTime") == null) {
userLoginToUpdate.set("disabledDateTime", UtilDateTime.nowTimestamp());
}
try {
userLoginToUpdate.store();
} catch (GenericEntityException e) {