Use new property to enable social network registration in registration controller

This commit is contained in:
Elias Luhr
2024-01-05 15:26:40 +01:00
parent edfbc44c52
commit 8f18c51cf2

View File

@ -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()) {