0

do we still have to replace $_SESSION php superglobal by Moodle global called $SESSION or not ?

$_SESSION -> $SESSION
ElCarraco
  • 51
  • 4

1 Answers1

0

You certainly shouldn't be "replacing" / overwriting the $_SESSION global with the value of $SESSION, because that would wipe out a whole lot of data used by Moodle.

If your question is, should be be using $SESSION in Moodle, instead of the PHP $_SESSION superglobal, then the answer is definitely yes (because Moodle is using $_SESSION and you don't want to be getting in the way of that).

davosmith
  • 6,037
  • 2
  • 14
  • 23