This is an automated email from the ASF dual-hosted git repository.
dixitdeepak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new a8b2868903 Removed partyId from ModelNotification.buildContext(), also
removed the dependency while getting auto user name from person/group
a8b2868903 is described below
commit a8b28689034d06ce2e5504401d2b1fcd7dd1b1d3
Author: Deepak Dixit <[email protected]>
AuthorDate: Tue May 26 11:05:36 2026 +0530
Removed partyId from ModelNotification.buildContext(), also removed the
dependency while getting auto user name from person/group
---
.../java/org/apache/ofbiz/service/ModelNotification.java | 5 -----
.../java/org/apache/ofbiz/webapp/control/LoginWorker.java | 14 +-------------
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git
a/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java
b/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java
index 1e634128f1..13239d44f0 100644
---
a/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java
+++
b/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java
@@ -125,10 +125,6 @@ public class ModelNotification {
public Map<String, Object> buildContext(Map<String, ? extends Object>
context, Map<String, Object> result, ModelService model)
throws GenericServiceException {
Map<String, Object> userLogin =
UtilGenerics.cast(context.get("userLogin"));
- String partyId = null;
- if (userLogin != null) {
- partyId = (String) userLogin.get("partyId");
- }
String screen = getScreen();
if (screen == null) {
@@ -160,7 +156,6 @@ public class ModelNotification {
notifyContext.put("sendCc", cc);
notifyContext.put("sendTo", to);
notifyContext.put("subject", subject);
- notifyContext.put("partyId", partyId);
notifyContext.put("bodyScreenUri", screen);
diff --git
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
index 4f0326a63f..7155ab4ba4 100644
---
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
+++
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
@@ -1133,21 +1133,9 @@ public final class LoginWorker {
}
try {
GenericValue autoUserLogin =
EntityQuery.use(delegator).from("UserLogin").where("userLoginId",
autoUserLoginId).queryOne();
- GenericValue person = null;
- GenericValue group = null;
if (autoUserLogin != null) {
session.setAttribute("autoUserLogin", autoUserLogin);
-
- ModelEntity modelUserLogin =
autoUserLogin.getModelEntity();
- if (modelUserLogin.isField("partyId")) {
- person =
EntityQuery.use(delegator).from("Person").where("partyId",
autoUserLogin.getString("partyId")).queryOne();
- group =
EntityQuery.use(delegator).from("PartyGroup").where("partyId",
autoUserLogin.getString("partyId")).queryOne();
- }
- }
- if (person != null) {
- session.setAttribute("autoName",
person.getString("firstName") + " " + person.getString("lastName"));
- } else if (group != null) {
- session.setAttribute("autoName",
group.getString("groupName"));
+ session.setAttribute("autoName",
autoUserLogin.getString("userFullName"));
}
} catch (GenericEntityException e) {
Debug.logError(e, "Cannot get autoUserLogin information: " +
e.getMessage(), MODULE);