Update developer_manual/basics/controllers.rst

Signed-off-by: Daniel <mail@danielkesselberg.de>
This commit is contained in:
Daniel
2022-12-14 22:42:19 +01:00
committed by GitHub
parent 0949e709f3
commit 8d2d28006b

View File

@@ -220,7 +220,7 @@ Reading and writing session variables
To set, get or modify session variables, the ISession object has to be injected into the controller.
Nextcloud will read existing session data at the beginning of the request lifecycle and close the session afterwards. This means that in order to write to the session, the session has to be opened first. This is done implicitly when calling the set method, but would close immidiately afterwards. To prevent this, the session has to be explicitly opened by calling the reopen method.
Nextcloud will read existing session data at the beginning of the request lifecycle and close the session afterwards. This means that in order to write to the session, the session has to be opened first. This is done implicitly when calling the set method, but would close immediately afterwards. To prevent this, the session has to be explicitly opened by calling the reopen method.
Alternatively you can use the ``@UseSession`` annotation to automatically open and close the session for you.