Luis Majano Forums Notification: Post to getRequestService().getContext() problem

Title: RE: getRequestService().getContext() problem
Thread: getRequestService().getContext() problem
Forum: Need Help?
Conference: ColdBox
User: sanaullah73

Hi xionic

I just tried your code, with cache=true. It works jut fine I think as
luis mentioned variables should be var scoped that could be a problem without
using var scope.
Here is the code of plugin, I modified a bit to make it work.
<cfcomponent name="rights" hint="This is the RM
plugin." extends="coldbox.system.plugin"
output="false" cache="true">

name="init" access="public" returntype="rights"
hint="Constructor" output="false">
<cfargument name="controller" type="any"
super.Init(arguments.controller) />
setpluginDescription("This plugin is used for checking RM.")>
<cfreturn this />
name="eventRightsCheck" access="Public"
hint="eventRightsCheck" output="false"
name="message" hint="Event, if not set use this event"
type="string" required="No" >
<cfargument name="user_id" hint="UserID, if not set will try
to get from session, otherwise return false" type="numeric"
required="No" >
        <cfset var Context =
        <cfset var returnValue =
RandRange(0,1) />
      <cfreturn returnValue/>

Please let me know if there's any problem.