Skip to content

Commit a28141b

Browse files
Don't store the password in the session after logging in
1 parent 5058252 commit a28141b

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/Entity/User.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -145,23 +145,6 @@ public function setRoles(array $roles): void
145145
*/
146146
public function eraseCredentials(): void
147147
{
148-
// if you had a plainPassword property, you'd nullify it here
149-
// $this->plainPassword = null;
150-
}
151-
152-
/**
153-
* @return array{int|null, string|null, string|null}
154-
*/
155-
public function __serialize(): array
156-
{
157-
return [$this->id, $this->username, $this->password];
158-
}
159-
160-
/**
161-
* @param array{int|null, string, string} $data
162-
*/
163-
public function __unserialize(array $data): void
164-
{
165-
[$this->id, $this->username, $this->password] = $data;
148+
$this->password = null;
166149
}
167150
}

0 commit comments

Comments
 (0)