Skip to content

Commit

Permalink
Fix default user fixtures on profile edit (#815)
Browse files Browse the repository at this point in the history
* Fix default user fixtures on profile edit

* Fix lint
  • Loading branch information
aerrasti committed Jan 9, 2023
1 parent 487f6fa commit 748e075
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions backend/packages/Core/src/DataFixtures/DefaultFixtures.php
Expand Up @@ -40,9 +40,10 @@ public function load(ObjectManager $manager): void
]);

UserFactory::createOne([
'email' => 'user@stooa.com',
'password' => self::ADMIN_PASSWORD,
'email' => 'user@stooa.com',
'password' => self::ADMIN_PASSWORD,
'active' => true,
'privacyPolicy' => true,
]);

$fishbowl = FishbowlFactory::createOne([
Expand All @@ -59,6 +60,7 @@ public function load(ObjectManager $manager): void
'active' => true,
'fishbowls' => [$fishbowl],
'createdAt' => new \DateTime(),
'privacyPolicy' => true,
]);
}
}
6 changes: 3 additions & 3 deletions backend/packages/Core/src/Entity/User.php
Expand Up @@ -135,20 +135,20 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
#[ORM\Column(type: 'boolean')]
private bool $privacyPolicy = false;

#[Groups(['user:self', 'user:write'])]
#[Groups(['user:self', 'user:write', 'user:read'])]
#[ORM\Column(type: 'boolean')]
private bool $allowShareData = false;

#[ORM\Column(type: 'boolean')]
private bool $active = false;

#[Groups(['user:self', 'user:write'])]
#[Groups(['user:self', 'user:write', 'user:read'])]
#[Assert\Url]
#[Assert\Length(max: 255)]
#[ORM\Column(type: 'string', nullable: true)]
private ?string $linkedinProfile = null;

#[Groups(['user:self', 'user:write'])]
#[Groups(['user:self', 'user:write', 'user:read'])]
#[Assert\Url]
#[Assert\Length(max: 255)]
#[ORM\Column(type: 'string', nullable: true)]
Expand Down

0 comments on commit 748e075

Please sign in to comment.