--- GuestUserPreferencesManager.org	2008-01-23 16:05:50.000000000 +0100
+++ GuestUserPreferencesManager.java	2008-01-23 14:21:35.000000000 +0100
@@ -27,6 +27,11 @@
 import org.apache.commons.logging.LogFactory;
 import org.jasig.portal.utils.PropsMatcher;
 
+// ESUP add to use anonymous direct access
+import org.jasig.portal.Constants;
+import org.jasig.portal.PortalException;
+// END ESUP
+
 /**
  * Multithreaded version of {@link UserPreferencesManager}.
  * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com">pkharchenko@interactivebusiness.com</a>}
@@ -279,6 +284,29 @@
                 log.error( "GuestUserPreferencesManager::processUserPreferencesParameters() : unable to extract channel ID. servletPath=\""+req.getServletPath()+"\".");
             }
         }
+        
+        // ESUP add to use anonymous direct access
+        // fname and root are mutually exclusive and
+        // should not be used in the same request,
+        // as an fname is treated as the root target.
+        String fname = req.getParameter( Constants.FNAME_PARAM );
+        if (fname != null) {
+            // get a subscribe id for the fname
+            String subId = null;
+            try {
+             subId = state.ulm.getSubscribeId(fname);
+            } catch ( PortalException pe ) {
+               log.error( "GuestUserPreferencesManager::processUserPreferencesParameters(): Unable to get subscribe ID for fname="+fname, pe);
+            }
+
+            state.complete_up.getStructureStylesheetUserPreferences().putParameterValue("userLayoutRoot", subId);
+            if (log.isDebugEnabled())
+                log.debug(
+                           "GuestUserPreferencesManager::processUserPreferencesParameters() : " +
+                           "setting sfname \" userLayoutRoot" + "\"=\"" + subId + "\".");
+        }
+        // END ESUP
+        
         // other params
         String[] sparams = req.getParameterValues("uP_sparam");
         if (sparams != null) {
