From de7ca710d04cf6d1f53e03f1af110745e48a186a Mon Sep 17 00:00:00 2001 From: nickw Date: Tue, 27 Apr 2010 16:58:06 +0000 Subject: Restricting external user creation from Facebook Services. git-svn-id: http://code.elgg.org/elgg/trunk@5905 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/walledgarden/start.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/walledgarden/start.php b/mod/walledgarden/start.php index 260a8c1e4..9c9a2fce3 100644 --- a/mod/walledgarden/start.php +++ b/mod/walledgarden/start.php @@ -13,7 +13,9 @@ function walledgarden_init(){ elgg_extend_view('pageshells/pageshell', 'walledgarden/walledgarden'); elgg_extend_view('css','walledgarden/css'); - register_plugin_hook('new_twitter_user', 'twitter_service', 'walledgarden_new_twitter_user'); + // restrict external user creation + register_plugin_hook('new_twitter_user', 'twitter_service', 'walledgarden_new_external_user'); + register_plugin_hook('new_facebook_user', 'facebook_service', 'walledgarden_new_external_user'); if(!isloggedin()) register_plugin_hook('index','system','walledgarden_index'); @@ -40,7 +42,7 @@ function walledgarden_index() { } -function walledgarden_new_twitter_user($hook, $entity_type, $returnvalue, $params) { +function walledgarden_new_external_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; -- cgit v1.2.3