Skip to content

Commit 5eab1fa

Browse files
committed
Prepare PasswordUpgraderInterface implementations for 6.0 signatures
1 parent 5564249 commit 5eab1fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Security/LdapUserProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function refreshUser(UserInterface $user)
132132
*
133133
* @final
134134
*/
135-
public function upgradePassword(UserInterface $user, string $newEncodedPassword): void
135+
public function upgradePassword($user, string $newHashedPassword): void
136136
{
137137
if (!$user instanceof LdapUser) {
138138
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_debug_type($user)));
@@ -143,9 +143,9 @@ public function upgradePassword(UserInterface $user, string $newEncodedPassword)
143143
}
144144

145145
try {
146-
$user->getEntry()->setAttribute($this->passwordAttribute, [$newEncodedPassword]);
146+
$user->getEntry()->setAttribute($this->passwordAttribute, [$newHashedPassword]);
147147
$this->ldap->getEntryManager()->update($user->getEntry());
148-
$user->setPassword($newEncodedPassword);
148+
$user->setPassword($newHashedPassword);
149149
} catch (ExceptionInterface $e) {
150150
// ignore failed password upgrades
151151
}

0 commit comments

Comments
 (0)