2

I need to get an ID of current session. Using httpRequest's cookies is not a good idea because session gets regenerated after login or by whatever action.

I also tried Session class but for getting a session ID it is needed to specify a section which Nette uses to split the application. However I couldn't find out the section name.

jmeinlschmidt
  • 1,446
  • 2
  • 14
  • 33

1 Answers1

3

There's method getSession() available in a presenter, so for accessing the session ID you can use:

$sessionId = $this->getSession()->getId();
Jan Rydrych
  • 2,188
  • 2
  • 13
  • 18