private void stashRequestUser(RequestAndResponse requestAndResponse){
  if (requestAndResponse.wasUserAlreadyStashed) {
    return;
  }
  requestAndResponse.wasUserAlreadyStashed=true;
  final User user=dbLogic.getUserById(getEffectiveUserId(requestAndResponse));
  if (user != null) {
    requestAndResponse.userIsAdmin=user.getIsAdmin();
    requestAndResponse.userIsAccountClosed=user.getIsAccountClosed();
    requestAndResponse.userOptions=user.getOptions();
  }
 else {
    requestAndResponse.userOptions="{}";
  }
}

private void stashRequestUser ( RequestAndResponse requestAndResponse ) { if ( requestAndResponse . wasUserAlreadyStashed ) { return ; } requestAndResponse . wasUserAlreadyStashed = true ; final User user = dbLogic . getUserById ( getEffectiveUserId ( requestAndResponse ) ) ; if ( user != null ) { requestAndResponse . userIsAdmin = user . getIsAdmin ( ) ; requestAndResponse . userIsAccountClosed = user . getIsAccountClosed ( ) ; requestAndResponse . userOptions = user . getOptions ( ) ; } else { requestAndResponse . userOptions = "{}" ; } }
stashes user information in the requestandresponse to reduce the number of queries and transactions .
