You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2011/03/16 14:40:22 UTC

svn commit: r1082146 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Author: adrianc
Date: Wed Mar 16 13:40:22 2011
New Revision: 1082146

URL: http://svn.apache.org/viewvc?rev=1082146&view=rev
Log:
Removed a framework dependency on the Party component. Framework-only tests pass now.


Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1082146&r1=1082145&r2=1082146&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Wed Mar 16 13:40:22 2011
@@ -537,8 +537,13 @@ public class LoginServices {
         userLoginToCreate.set("passwordHint", passwordHint);
         userLoginToCreate.set("enabled", enabled);
         userLoginToCreate.set("requirePasswordChange", requirePasswordChange);
-        userLoginToCreate.set("partyId", partyId);
         userLoginToCreate.set("currentPassword", useEncryption ? HashCrypt.getDigestHash(currentPassword, getHashType()) : currentPassword);
+        try {
+            userLoginToCreate.set("partyId", partyId);
+        } catch (Exception e) {
+            // Will get thrown in framework-only installation
+            Debug.logInfo(e, "Exception thrown while setting UserLogin partyId field: ", module);
+        }
 
         try {
             EntityCondition condition = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.EQUALS, EntityFunction.UPPER(userLoginId));