Elgg  Version 5.1
Go to the documentation of this file.
1 <?php
3 // if you cancel this even you should present a message to the user
4 if (!elgg_trigger_before_event('regenerate_site_secret', 'system')) {
5  return elgg_ok_response('', elgg_echo('admin:site:secret:prevented'));
6 }
8 _elgg_services()->siteSecret->regenerate();
11 elgg_trigger_after_event('regenerate_site_secret', 'system');
12 elgg_delete_admin_notice('weak_site_key');
14 return elgg_ok_response('', elgg_echo('admin:site:secret:regenerated'));
Reset the system cache by deleting the caches.
Definition: cache.php:21
elgg_ok_response($content= '', string|array $message= '', string $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_trigger_after_event(string $event, string $type, $object=null)
Trigger an "After event" indicating a process has finished.
Definition: events.php:157
elgg_delete_admin_notice(string $id)
Remove an admin notice by ID.
Definition: admin.php:63
elgg_trigger_before_event(string $event, string $type, $object=null)
Trigger a "Before event" indicating a process is about to begin.
Definition: events.php:138
Get the global service provider.
Definition: elgglib.php:346