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');
There isn't a specific hook/event after the plugin settings are saved. But you can always listen to the plugin hook 'response', 'action:plugins/settings/save'.
If you get an OKReponse in the hook, everything went well. If you get an ErrorResponse something went wrong.
Learn more: http://learn.elgg.org/en/stable/guides/hooks-list.html#action-hooks
Thanks a lot
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.