You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/02/03 07:50:42 UTC

svn commit: r740227 - /ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy

Author: hansbak
Date: Tue Feb  3 06:50:42 2009
New Revision: 740227

URL: http://svn.apache.org/viewvc?rev=740227&view=rev
Log:
I created a new userlogin with './ant create-admin-user-login' and logged in with that user. I now see that a logged on userLogin not always has a related party which is not taken care of in the party manager.......i fixed this error but then wanted to change the password of the admin user.... and looked at the admin profile....a box of pandora?

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy?rev=740227&r1=740226&r2=740227&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy Tue Feb  3 06:50:42 2009
@@ -20,9 +20,11 @@
 //figure out the PRIMARY_EMAIL of the logged in user, for setting in the send email link
 //maybe nice to put in some secondary emails later
 if (userLogin) {
-  userLoginParty = userLogin.getRelatedOneCache("Party");
-  userLoginPartyPrimaryEmails = userLoginParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
-  if (userLoginPartyPrimaryEmails) {
-      context.thisUserPrimaryEmail = userLoginPartyPrimaryEmails.get(0);
-  }
+    userLoginParty = userLogin.getRelatedOneCache("Party");
+    if (userLoginParty) {
+    	userLoginPartyPrimaryEmails = userLoginParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
+    	if (userLoginPartyPrimaryEmails) {
+    		context.thisUserPrimaryEmail = userLoginPartyPrimaryEmails.get(0);
+    	}
+    }
 }