@Nikolai
That wouldn't work as the session (and session manager) only apply to the logged in user. There is no way that those services can touch other sessions (luckily).
@Hermand
What is your goal? If you wish to perform some maintenance to the server and don't want to have any users only. Simply enable Maintenance mode from the admin side.
With a bit of programming you can truncate the users_sessions table and therefor nobody will be logged in anymore (maybe also truncate the users_remember_me_cookies table to not automatically let users log back in who have Remember me enabled)
@Jerome I assumed this
@jeabakker and @rivervanrain thanks a a lot I will simply enable Maintenance mode from the admin side.
Thank,
Please take a look at my example, 'toto' is an array and ['toto']['lib'] is also an array. How can I achieve that using elgg_get_session(); ?
$_SESSION['toto'] = array();
$_SESSION['toto']['lib'] = array();
$_SESSION['toto']['abs'] = array();
$_SESSION['toto']['sub'] = array()
Why not use this:
$session = elgg_get_session();
$session->set('toto', [
'lib' => 'value_1',
'abs' => 'value_2',
'sub' => 'value_3',
]);
$array = $session->get('toto');
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.