From 43bd1ca47eb185b08b6fd56fe5ca7185d7927c9a Mon Sep 17 00:00:00 2001 From: Ismayil Khayredinov Date: Thu, 15 Oct 2015 13:59:11 +0200 Subject: [PATCH] fix: do not display registration form if registration is disabled --- views/default/resources/hybridauth/authenticate.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/views/default/resources/hybridauth/authenticate.php b/views/default/resources/hybridauth/authenticate.php index e94fb8b..3338427 100644 --- a/views/default/resources/hybridauth/authenticate.php +++ b/views/default/resources/hybridauth/authenticate.php @@ -163,6 +163,11 @@ forward($forward_url); } else { + if (!elgg_get_config('allow_registration')) { + register_error(elgg_echo('registerdisabled')); + forward('', '403'); + } + $title = elgg_echo('hybridauth:register'); $content = elgg_view_form('hybridauth/register', array(), array( 'provider' => $provider->getName(),