diff options
| author | polo <ordipolo@gmx.fr> | 2026-03-24 22:39:29 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-03-24 22:40:33 +0100 |
| commit | 3b369122645b07b290f7fcc7bccb4787745cd5ea (patch) | |
| tree | 3f9c2d1fbd5fe8b26162202e9b1e6cd5c8a940f6 /src/model/entities/User.php | |
| parent | a70dee9b5021a137ae07041c38921553442b0c11 (diff) | |
| download | cms-3b369122645b07b290f7fcc7bccb4787745cd5ea.tar.gz cms-3b369122645b07b290f7fcc7bccb4787745cd5ea.tar.bz2 cms-3b369122645b07b290f7fcc7bccb4787745cd5ea.zip | |
mode maintenance, optimisation moins de contrôles en mode run, dossier service et déplacement fichiers, sessions et entité User préparées à l'implémentation hypothétique des rôles, entité AppMetadata, meilleure sécurité de fillStartingDatabase
Diffstat (limited to 'src/model/entities/User.php')
| -rw-r--r-- | src/model/entities/User.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/model/entities/User.php b/src/model/entities/User.php index 26802e2..36bc4db 100644 --- a/src/model/entities/User.php +++ b/src/model/entities/User.php | |||
| @@ -22,15 +22,24 @@ class User | |||
| 22 | #[ORM\Column(type: "string", length: 255, unique: true)] // risque de modifier son mot de passe sans s'apercevoir qu'il fonctionne encore sur un autre compte | 22 | #[ORM\Column(type: "string", length: 255, unique: true)] // risque de modifier son mot de passe sans s'apercevoir qu'il fonctionne encore sur un autre compte |
| 23 | private string $login; | 23 | private string $login; |
| 24 | 24 | ||
| 25 | #[ORM\Column(type: "string", length: 50)] | ||
| 26 | private string $role; | ||
| 27 | |||
| 25 | #[ORM\Column(type: "string", length: 255)] | 28 | #[ORM\Column(type: "string", length: 255)] |
| 26 | private string $password; | 29 | private string $password; |
| 27 | 30 | ||
| 28 | public function __construct(string $login, string $password) | 31 | public function __construct(string $login, string $role, string $password) |
| 29 | { | 32 | { |
| 30 | $this->login = $login; | 33 | $this->login = $login; |
| 34 | $this->role = $role; | ||
| 31 | $this->password = $password; | 35 | $this->password = $password; |
| 32 | } | 36 | } |
| 33 | 37 | ||
| 38 | public function getId(): int | ||
| 39 | { | ||
| 40 | return $this->id_user; | ||
| 41 | } | ||
| 42 | |||
| 34 | public function getLogin(): string | 43 | public function getLogin(): string |
| 35 | { | 44 | { |
| 36 | return $this->login; | 45 | return $this->login; |
| @@ -39,6 +48,14 @@ class User | |||
| 39 | { | 48 | { |
| 40 | $this->login = $login; | 49 | $this->login = $login; |
| 41 | } | 50 | } |
| 51 | public function getRole(): string | ||
| 52 | { | ||
| 53 | return $this->role; | ||
| 54 | } | ||
| 55 | public function setRole(string $role): void | ||
| 56 | { | ||
| 57 | $this->role = $role; | ||
| 58 | } | ||
| 42 | public function getPassword(): string | 59 | public function getPassword(): string |
| 43 | { | 60 | { |
| 44 | return $this->password; | 61 | return $this->password; |
