anchor.diff:         errors = new HashSet();
          session.setAttribute( "errors", errors );
       }
  -
       
       // Extract the user profile and action attributes
  -    UserProfile profile = userMgr.parseProfile( wikiContext );
  +    profile = userMgr.parseProfile( wikiContext );
       String ok = request.getParameter("ok");
       String clear = request.getParameter("clear");
   
  
positive.code:         }
          if ( errors.size() == 0 )
          {
              response.sendRedirect( wiki.getBaseURL()+"Wiki.jsp" );
          }
          response.sendRedirect( wiki.getBaseURL()+"UserPreferences.jsp" );
      }
      else if( clear != null )
      {
  
negative.code: <%
      WikiContext wikiContext = wiki.createContext( request, WikiContext.PREFS );
      AuthenticationManager mgr = wiki.getAuthenticationManager();
      AuthorizationManager authMgr = wiki.getAuthorizationManager();
      UserManager userMgr = wiki.getUserManager();
      boolean containerAuth = mgr.isContainerAuthenticated();
      boolean cookieAssertions = AuthenticationManager.allowsCookieAssertions();
      boolean isAuthenticated = wikiContext.getWikiSession().isAuthenticated();
      
      // User must have permission to change the profile
      if( !authMgr.checkPermission( wikiContext, WikiPermission.PREFERENCES ) )
      {
          log.info("User "+wikiContext.getCurrentUser()+" has no access to set preferences - redirecting to login page.");
          String msg = "You do not seem to have the permissions for this operation. Would you like to login as another user?";
  