Restrict new registrations with env setting

This commit is contained in:
Daniel Supernault 2018-05-23 21:03:20 -06:00
parent b6dc212b4d
commit 1e3a432087
3 changed files with 13 additions and 0 deletions

View file

@ -39,6 +39,7 @@ class RegisterController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->openRegistrationCheck();
}
/**
@ -83,4 +84,12 @@ class RegisterController extends Controller
return abort(403);
}
}
public function openRegistrationCheck()
{
$openRegistration = config('pixelfed.open_registration');
if(false == $openRegistration) {
abort(403);
}
}
}