Restrict new registrations with env setting
This commit is contained in:
parent
b6dc212b4d
commit
1e3a432087
3 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue