Skip to content

Commit a53f930

Browse files
committed
minor #1514 Remove the salt from the user entity (javiereguiluz)
This PR was merged into the main branch. Discussion ---------- Remove the salt from the user entity This is not needed since a long time ago. Commits ------- a0caccd Remove the salt from the user entity
2 parents b02544a + a0caccd commit a53f930

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/Entity/User.php

-16
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,6 @@ public function setRoles(array $roles): void
138138
$this->roles = $roles;
139139
}
140140

141-
/**
142-
* Returns the salt that was originally used to encode the password.
143-
*
144-
* {@inheritdoc}
145-
*/
146-
public function getSalt(): ?string
147-
{
148-
// We're using bcrypt in security.yaml to encode the password, so
149-
// the salt value is built-in and you don't have to generate one
150-
// See https://en.wikipedia.org/wiki/Bcrypt
151-
152-
return null;
153-
}
154-
155141
/**
156142
* Removes sensitive data from the user.
157143
*
@@ -168,7 +154,6 @@ public function eraseCredentials(): void
168154
*/
169155
public function __serialize(): array
170156
{
171-
// add $this->salt too if you don't use Bcrypt or Argon2i
172157
return [$this->id, $this->username, $this->password];
173158
}
174159

@@ -177,7 +162,6 @@ public function __serialize(): array
177162
*/
178163
public function __unserialize(array $data): void
179164
{
180-
// add $this->salt too if you don't use Bcrypt or Argon2i
181165
[$this->id, $this->username, $this->password] = $data;
182166
}
183167
}

0 commit comments

Comments
 (0)