svn commit: r1848926 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1848926 - /ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java

jleroux@apache.org
Author: jleroux
Date: Fri Dec 14 11:08:52 2018
New Revision: 1848926

URL: http://svn.apache.org/viewvc?rev=1848926&view=rev
Log:
Improved: LoginWorker.autoLoginCheck performance improvement
(OFBIZ-10709)

LoginWorker.autoLoginCheck does not check if the attribute "autoUserLogin" is
not already filled and executes even if it is not needed. A check on the
attribute beforehand can improve performance significantly.

Thanks: Benjamin Jugl

Modified:
    ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java?rev=1848926&r1=1848925&r2=1848926&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java Fri Dec 14 11:08:52 2018
@@ -1003,6 +1003,11 @@ public class LoginWorker {
     public static String autoLoginCheck(HttpServletRequest request, HttpServletResponse response) {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         HttpSession session = request.getSession();
+        
+        GenericValue autoUserLogin = (GenericValue) session.getAttribute("autoUserLogin");
+        if (autoUserLogin != null){
+            return "success";
+        }
 
         return autoLoginCheck(delegator, session, getAutoUserLoginId(request));
     }