diff --git a/src/User/Controller/RegistrationController.php b/src/User/Controller/RegistrationController.php index 6abb039..c1c11f6 100644 --- a/src/User/Controller/RegistrationController.php +++ b/src/User/Controller/RegistrationController.php @@ -152,6 +152,10 @@ class RegistrationController extends Controller */ public function actionConnect($code) { + if (!$this->module->enableSocialNetworkRegistration) { + throw new NotFoundHttpException(); + } + /** @var SocialNetworkAccount $account */ $account = $this->socialNetworkAccountQuery->whereCode($code)->one(); if ($account === null || $account->getIsConnected()) {