But there problem is How would I get the logged in user ID. 
Here is what I m trying to do.
[SPParamLoader]
public partial class CMSModuleLoader
{
    public class SPParamLoader:CMSLoaderAttribute
{
    public override void Init()
    {
        SqlEvents.ExecuteQuery.Before += ExecuteQuery_Before;
    }
    void ExecuteQuery_Before(object sender, ExecuteQueryEventArgs<System.Data.DataSet> e)
    {
        if (e.Query.Name != null)
        {
            switch (e.Query.Name.ToLowerCSafe())
            {
                case "Custom.ImmformAccessInfo.ImmformAccessInfoQuery":
                   QueryDataParameters param  = new QueryDataParameters() {
                       new DataParameter("@UserID", ??????? From where I would Get the ID )
                   }
                    break;
            }
        }
    }
}
}