aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/walledgarden/languages/en.php12
-rw-r--r--mod/walledgarden/start.php9
2 files changed, 20 insertions, 1 deletions
diff --git a/mod/walledgarden/languages/en.php b/mod/walledgarden/languages/en.php
new file mode 100644
index 000000000..4943ec94f
--- /dev/null
+++ b/mod/walledgarden/languages/en.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * An English language translation file
+ */
+
+$english = array(
+ 'walledgarden' => 'Walled Garden',
+
+ 'walledgarden:new_user:fail' => 'This site does not accept new user registration.',
+);
+
+add_translation('en', $english);
diff --git a/mod/walledgarden/start.php b/mod/walledgarden/start.php
index 9d28a1418..df0982d3c 100644
--- a/mod/walledgarden/start.php
+++ b/mod/walledgarden/start.php
@@ -29,7 +29,8 @@
//if (function_exists('elgg_view_disable_simplecache')) {
// elgg_view_disable_simplecache();
//}
-
+
+ register_plugin_hook('new_twitter_user', 'twitter_service', 'walledgarden_new_twitter_user');
}
function walledgarden_pagesetup() {
@@ -52,6 +53,12 @@
return true;
}
+
+ function walledgarden_new_twitter_user($hook, $entity_type, $returnvalue, $params) {
+ // do not allow new users to be created within the walled-garden
+ register_error(elgg_echo('walledgarden:new_user:fail'));
+ return FALSE;
+ }
register_elgg_event_handler('init','system','walledgarden_init');
register_elgg_event_handler('pagesetup','system','walledgarden_pagesetup');