Accessing session data in plugin controller.

I have the following problem.

My application uses sessions to reference the current user with user_id. It is implemented in rails 1.2.5.

Now I created a plugin which needs to access session[:user_id]. Due to security reasons I do not want to youse params. But when I access session[:user_id] in the plugin the value is not set.

Actually a totally new session is created just for the plugin. Thus neither my session variable nor flash messages work.

Is there some trick to use sessions in plugins?