207 if ($secret[0] !==
'z') {
208 $rand_max = getrandmax();
209 if ($rand_max < pow(2, 16)) {
212 if ($rand_max < pow(2, 32)) {
299 header(
"Content-Type: application/json");
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
elgg_is_xhr()
Checks whether the request was requested via ajax.
action($action, $forwarder="")
Perform an action.
action_gatekeeper($action)
Validates the presence of action tokens.
elgg_action_exists($action)
Check if an action is registered and its script exists.
elgg_register_simplecache_view($view_name)
Registers a view to simple cache.
init_site_secret()
Initialise the site secret (32 bytes: "z" to indicate format + 186-bit key in Base64 URL)...
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
Register a callback as a plugin hook handler.
generate_action_token($timestamp)
Generate an action token.
datalist_get($name)
Get the value of a datalist element.
actions_init()
Initialize some ajaxy actions features private.
datalist_set($name, $value)
Set the value for a datalist element.
elgg echo
Translates a string.
elgg_register_page_handler($identifier, $function)
Registers a page handler for a particular identifier.
ajax_forward_hook($hook, $type, $reason, $params)
Catch calls to forward() in ajax request and force an exit.
get_site_secret()
Returns the site secret.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
Register a callback as an Elgg event handler.
_elgg_action_handler(array $segments)
Handle a request for an action.
validate_action_token($visible_errors=true, $token=null, $ts=null)
Validate an action token.
_elgg_get_site_secret_strength()
Get the strength of the site secret.
_elgg_csrf_token_refresh()
Send an updated CSRF token.
clearfix elgg elgg elgg elgg page header
elgg_register_action($action, $filename="", $access= 'logged_in')
Registers an action.
ajax_action_hook()
Buffer all output echo'd directly in the action for inclusion in the returned JSON.
elgg_unregister_action($action)
Unregisters an action.