- set social login credentials

- disallow registration refactoring
This commit is contained in:
Čarodej
2022-01-11 13:22:25 +01:00
parent 62cbcd14ed
commit 1c188081b3
23 changed files with 891 additions and 148 deletions

View File

@@ -10,11 +10,18 @@ class RegisterUserController extends Controller
{
public function __construct(
public CreateNewUserAction $createNewUser,
) {
}
) {}
public function __invoke(RegisterUserRequest $request)
{
// Check if account registration is enabled
if (! intval(get_settings('registration'))) {
return response([
'type' => 'error',
'message' => 'User registration is not allowed',
], 401);
}
// Map registration data
$data = CreateUserData::fromRequest($request);