Can you save a variable in session?
Craft's HttpSessionService is a thin wrapper for PHP's global $_SESSION variable.

You can use:

craft()-&gt;httpSession-&gt;add($key, $value)


and:

craft()-&gt;httpSession-&gt;get($key)


to save and retrieve values from it.