mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: user registration endpoint
This commit is contained in:
@@ -44,7 +44,7 @@ class RegistrationController extends AbstractController
|
||||
name: 'user_register',
|
||||
defaults: [
|
||||
'_api_resource_class' => User::class,
|
||||
'_api_operation_name' => 'register',
|
||||
'_api_operation_name' => 'user_register',
|
||||
],
|
||||
methods: ['POST']
|
||||
)]
|
||||
@@ -75,9 +75,6 @@ class RegistrationController extends AbstractController
|
||||
)
|
||||
);
|
||||
|
||||
$this->em->persist($user);
|
||||
$this->em->flush();
|
||||
|
||||
if (false === (bool) $this->getParameter('registration_verify_email')) {
|
||||
$user->setVerified(true);
|
||||
} else {
|
||||
@@ -97,6 +94,9 @@ class RegistrationController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
$this->em->persist($user);
|
||||
$this->em->flush();
|
||||
|
||||
$this->logger->info('A new user has registered ({username}).', [
|
||||
'username' => $user->getUserIdentifier(),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user