Skip to content

Commit 9a61b81

Browse files
authored
Merge pull request #1110 from nicolas-grekas/sec-config-pwd
[make:user] Don't add to passwork_hashers if default recipe is in use
2 parents ea27dd1 + e571e37 commit 9a61b81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Security/SecurityConfigUpdater.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\HttpKernel\Log\Logger;
1616
use Symfony\Component\PasswordHasher\Hasher\NativePasswordHasher;
1717
use Symfony\Component\Security\Core\Encoder\NativePasswordEncoder;
18+
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
1819

1920
/**
2021
* @author Ryan Weaver <[email protected]>
@@ -175,6 +176,10 @@ private function updatePasswordHashers(UserClassConfiguration $userConfig, strin
175176
return;
176177
}
177178

179+
if (isset($newData['security'][$keyName][PasswordAuthenticatedUserInterface::class])) {
180+
return;
181+
}
182+
178183
if (!isset($newData['security'][$keyName])) {
179184
// by convention, password_hashers are put before the user provider option
180185
$providersIndex = array_search('providers', array_keys($newData['security']));

0 commit comments

Comments
 (0)