mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7211 from kinglozzer/migrate-legacy-hashes-config
Fix: Use Config API for MemberAuthenticator::$migrate_legacy_hashes (fixes #7208)
This commit is contained in:
commit
2e34730d3d
@ -161,9 +161,10 @@ class MemberAuthenticator extends Authenticator {
|
|||||||
// when we can rehash passwords to a different hashing algorithm,
|
// when we can rehash passwords to a different hashing algorithm,
|
||||||
// bulk-migration doesn't work due to the nature of hashing.
|
// bulk-migration doesn't work due to the nature of hashing.
|
||||||
// See PasswordEncryptor_LegacyPHPHash class.
|
// See PasswordEncryptor_LegacyPHPHash class.
|
||||||
if($success && $member && isset(self::$migrate_legacy_hashes[$member->PasswordEncryption])) {
|
$migrateLegacyHashes = self::config()->migrate_legacy_hashes;
|
||||||
|
if($success && $member && isset($migrateLegacyHashes[$member->PasswordEncryption])) {
|
||||||
$member->Password = $data['Password'];
|
$member->Password = $data['Password'];
|
||||||
$member->PasswordEncryption = self::$migrate_legacy_hashes[$member->PasswordEncryption];
|
$member->PasswordEncryption = $migrateLegacyHashes[$member->PasswordEncryption];
|
||||||
$member->write();
|
$member->write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user