$SESSION not working inside class context

$SESSION not working inside class context

by Sen G -
Number of replies: 0

Hi guys,


I'm trying to add some extra data to Moodle's session using the following statement.

global $SESSION;
$SESSION->myextravar = 'saveit';

It works fine, if I use it outside class, but when I use it inside class, it doesn't seem to set the value. Can anyone help me?

Average of ratings: -