Skip to content

Commit 8cdf600

Browse files
committed
Remove collection of emails for self-registered users
1 parent 4235363 commit 8cdf600

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DoctrineMigrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
final class Version20251130111340 extends AbstractMigration
11+
{
12+
public function getDescription(): string
13+
{
14+
return '';
15+
}
16+
17+
public function up(Schema $schema): void
18+
{
19+
$this->addSql('ALTER TABLE user DROP email');
20+
}
21+
22+
public function down(Schema $schema): void
23+
{
24+
$this->addSql('ALTER TABLE user ADD email VARCHAR(255) DEFAULT NULL COMMENT \'Email address\'');
25+
}
26+
27+
public function isTransactional(): bool
28+
{
29+
return false;
30+
}
31+
}

webapp/src/Entity/User.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ class User extends BaseApiEntity implements
5858
#[ORM\Column(options: ['comment' => 'Name'])]
5959
private string $name = '';
6060

61-
#[ORM\Column(nullable: true, options: ['comment' => 'Email address'])]
62-
#[Assert\Email]
63-
#[OA\Property(nullable: true)]
64-
#[Serializer\Groups([ARC::GROUP_NONSTRICT])]
65-
private ?string $email = null;
66-
6761
#[ORM\Column(
6862
type: 'decimal',
6963
precision: 32,
@@ -217,17 +211,6 @@ public function getShortDescription(): string
217211
return $this->getName();
218212
}
219213

220-
public function setEmail(?string $email): User
221-
{
222-
$this->email = $email;
223-
return $this;
224-
}
225-
226-
public function getEmail(): ?string
227-
{
228-
return $this->email;
229-
}
230-
231214
public function setLastLogin(string|float|null $lastLogin): User
232215
{
233216
$this->last_login = $lastLogin;

0 commit comments

Comments
 (0)