diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 21:24:21 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 21:24:21 +0000 |
commit | a76b3e545010f2c33adbfc29063e989b6aac8c55 (patch) | |
tree | 536ac85c4f5d2984cf80d04ce8ed67a348edd9e3 /mod/walledgarden/start.php | |
parent | 412032ca0bf47896291a0a4074245cd2660cb3a7 (diff) | |
download | elgg-a76b3e545010f2c33adbfc29063e989b6aac8c55.tar.gz elgg-a76b3e545010f2c33adbfc29063e989b6aac8c55.tar.bz2 |
Registering a Walled Garden hook which will not allow new user signup with Twitter Services.
git-svn-id: http://code.elgg.org/elgg/trunk@5784 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/walledgarden/start.php')
-rw-r--r-- | mod/walledgarden/start.php | 9 |
1 files changed, 8 insertions, 1 deletions
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'); |