Elgg  Version 1.9
Namespaces | Variables
save.php File Reference

Go to the source code of this file.


 Activate a plugin or plugins.


 $params = get_input('params')
 $plugin_id = get_input('plugin_id')
 $user_guid = get_input('user_guid', elgg_get_logged_in_user_guid())
 $plugin = elgg_get_plugin_from_id($plugin_id)
 $user = get_entity($user_guid)
if(!($plugin instanceof ElggPlugin)) if(!($user instanceof ElggUser)) $plugin_name = $plugin->getManifest()->getName()
if(!$user->canEdit()) $result = false
if(elgg_action_exists("$plugin_id/usersettings/save")) else

Variable Documentation

$params = get_input('params')

Definition at line 16 of file save.php.

Definition at line 19 of file save.php.

$plugin_id = get_input('plugin_id')

Definition at line 17 of file save.php.

if (!($plugin instanceof ElggPlugin)) if (!($user instanceof ElggUser)) $plugin_name = $plugin->getManifest()->getName()

Definition at line 32 of file save.php.

if (!$user->canEdit()) $result = false

Definition at line 40 of file save.php.

$user = get_entity($user_guid)

Definition at line 20 of file save.php.

$user_guid = get_input('user_guid', elgg_get_logged_in_user_guid())

Definition at line 18 of file save.php.

if (elgg_action_exists("$plugin_id/usersettings/save")) else
Initial value:
foreach ($params as $k => $v) {
$result = $plugin->setUserSetting($k, $v, $user->guid);
if (!$result) {
register_error(elgg_echo('plugins:usersettings:save:fail', array($plugin_name)));
system_message(elgg_echo('plugins:usersettings:save:ok', array($plugin_name)))
Definition: save.php:15
Definition: save.php:26
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:419
if(!$entity) $user
Definition: save.php:46
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
Definition: elgglib.php:2162
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:374
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
Definition: save.php:17
if(!($plugin instanceof ElggPlugin)) $plugin_name
Definition: save.php:24

Definition at line 44 of file save.php.