Elgg/Elgg — pull request #6722 by jeabakker (2014-04-14 14:53:36+00:00)
Title: fix(session): session unavailable in shutdown functions

Shutdown functions defined in plugin can't access information in session
because this was already closed.

Because of the `register_shutdown_function('session_write_close');` the session was closed as one of the first shutdown functions. If a plugin wanted to get/set some information during a shutdown functions this was unavailable.

The shutdown function was registered (I think) because it needed access to `$CONFIG->dbprefix`, this was however also available by using `$this->db->getTablePrefix()`.

Now the session is available for all shutdown functions.