Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Namespaces | Variables
save.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Variables

 $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.

$plugin = elgg_get_plugin_from_id($plugin_id)

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)))
$params
Definition: save.php:15
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$result
Definition: save.php:26
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
if(!$entity) $user
Definition: save.php:54
const REFERER
Definition: elgglib.php:2029
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
$plugin
Definition: save.php:17
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438
if(!($plugin instanceof ElggPlugin)) $plugin_name
Definition: save.php:24

Definition at line 44 of file save.php.