From a0caccd6c0ff8bdc0caf718ad920485ed0080c7b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 15 Apr 2024 12:12:33 +0200 Subject: [PATCH] Remove the salt from the user entity --- src/Entity/User.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Entity/User.php b/src/Entity/User.php index 547ee659f..de676026b 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -138,20 +138,6 @@ public function setRoles(array $roles): void $this->roles = $roles; } - /** - * Returns the salt that was originally used to encode the password. - * - * {@inheritdoc} - */ - public function getSalt(): ?string - { - // We're using bcrypt in security.yaml to encode the password, so - // the salt value is built-in and you don't have to generate one - // See https://en.wikipedia.org/wiki/Bcrypt - - return null; - } - /** * Removes sensitive data from the user. * @@ -168,7 +154,6 @@ public function eraseCredentials(): void */ public function __serialize(): array { - // add $this->salt too if you don't use Bcrypt or Argon2i return [$this->id, $this->username, $this->password]; } @@ -177,7 +162,6 @@ public function __serialize(): array */ public function __unserialize(array $data): void { - // add $this->salt too if you don't use Bcrypt or Argon2i [$this->id, $this->username, $this->password] = $data; } }