Skip to content

Instantly share code, notes, and snippets.

@robertz
Created August 25, 2014 17:07
Show Gist options
  • Save robertz/4ba6cdc6b4005ada384c to your computer and use it in GitHub Desktop.
Save robertz/4ba6cdc6b4005ada384c to your computer and use it in GitHub Desktop.
RequestContextDecorator example
component extends="coldbox.system.web.context.RequestContextDecorator" {
public void function configure(){
var rc = getRequestContext().getCollection();
var prc = getRequestContext().getCollection(private = true);
if(!structKeyExists(session, 'memberGUID')){
session['memberGUID'] = getController().getSetting('defaultMemberGUID');
}
prc['memberInfo'] = getController().getWirebox().getInstance('MemberService').getMember(session.memberGUID);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment