From 90767052818f4068b4f210b034336ac482c35ea8 Mon Sep 17 00:00:00 2001 From: Remo Laubacher Date: Tue, 27 Jan 2015 13:42:14 +0100 Subject: [PATCH] constant added to disable automatic registration --- controllers/social/controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/social/controller.php b/controllers/social/controller.php index a13ff05..622aa35 100644 --- a/controllers/social/controller.php +++ b/controllers/social/controller.php @@ -87,6 +87,10 @@ protected function do_login() protected function do_register() { + if (defined('SOCIAL_DISABLE_REGISTRATION') && constant('SOCIAL_DISABLE_REGISTRATION')) { + throw new Exception(t('Account with ID %s not found! Automatic registration disabled, please create account in dashboard!', $this->user->identifier)); + } + $response = null; $rand = md5(uniqid()); $uName = $this->generateUsername();