aboutsummaryrefslogtreecommitdiff
path: root/mod/defaultwidgets
diff options
context:
space:
mode:
Diffstat (limited to 'mod/defaultwidgets')
-rw-r--r--mod/defaultwidgets/actions/update.php3
-rw-r--r--mod/defaultwidgets/start.php4
2 files changed, 2 insertions, 5 deletions
diff --git a/mod/defaultwidgets/actions/update.php b/mod/defaultwidgets/actions/update.php
index 466bae5a6..9b34c228c 100644
--- a/mod/defaultwidgets/actions/update.php
+++ b/mod/defaultwidgets/actions/update.php
@@ -6,9 +6,6 @@
*
**/
-// validate user is an admin
-admin_gatekeeper ();
-
// get parameters
$context = get_input ( 'context' );
$leftbar = str_replace ( '::0', '', get_input ( 'debugField1' ) );
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php
index f7adc3581..acac3f338 100644
--- a/mod/defaultwidgets/start.php
+++ b/mod/defaultwidgets/start.php
@@ -24,7 +24,7 @@ global $CONFIG;
*/
function defaultwidgets_init() {
// register create user event hook
- register_elgg_event_handler ( 'create', 'user', 'defaultwidgets_newusers' );
+ elgg_register_event_handler('create', 'user', 'defaultwidgets_newusers' );
// set the widget access to the default access on validation if this is not an admin-created user
if (!isadminloggedin()) {
@@ -204,4 +204,4 @@ elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_c
elgg_register_plugin_hook_handler('permissions_check', 'object', 'defaultwidgets_can_edit');
elgg_register_plugin_hook_handler('container_permissions_check', 'user', 'defaultwidgets_can_edit_container');
-elgg_register_action("defaultwidgets/update", $CONFIG->pluginspath . "defaultwidgets/actions/update.php");
+elgg_register_action("defaultwidgets/update", $CONFIG->pluginspath . "defaultwidgets/actions/update.php", 'admin');