1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-05 18:41:02 +00:00
This commit is contained in:
Jeremy Benoist 2022-11-23 15:51:33 +01:00
parent af6363bbbd
commit b7dba18cb2
No known key found for this signature in database
GPG key ID: 7168D5DD29F38552
41 changed files with 285 additions and 950 deletions

View file

@ -102,6 +102,7 @@ class UserRestController extends WallabagRestController
$userManager = $this->get(UserManagerInterface::class);
$user = $userManager->createUser();
\assert($user instanceof User);
// user will be disabled BY DEFAULT to avoid spamming account to be enabled
$user->setEnabled(false);
@ -150,7 +151,7 @@ class UserRestController extends WallabagRestController
$client = new Client($user);
$client->setName($request->request->get('client_name', 'Default client'));
$this->getDoctrine()->getManager()->persist($client);
$this->get('doctrine')->getManager()->persist($client);
$user->addClient($client);