mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-27 02:57:53 +01:00
Minor - don't perform registration settings migration if old path doesn't exist
- Migration was otherwise performed if config.yml was blank, which produces confusing output
This commit is contained in:
parent
e17b1f0fdf
commit
56017c81d0
@ -228,11 +228,12 @@ public class SettingsMigrationService extends PlainMigrationService {
|
||||
}
|
||||
|
||||
private static boolean convertToRegistrationType(PropertyResource resource) {
|
||||
if (RegistrationSettings.REGISTRATION_TYPE.isPresent(resource)) {
|
||||
String oldEmailRegistrationPath = "settings.registration.enableEmailRegistrationSystem";
|
||||
if (RegistrationSettings.REGISTRATION_TYPE.isPresent(resource) || !resource.contains(oldEmailRegistrationPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean useEmail = newProperty("settings.registration.enableEmailRegistrationSystem", false).getValue(resource);
|
||||
boolean useEmail = newProperty(oldEmailRegistrationPath, false).getValue(resource);
|
||||
RegistrationType registrationType = useEmail ? RegistrationType.EMAIL : RegistrationType.PASSWORD;
|
||||
|
||||
String useConfirmationPath = useEmail
|
||||
|
Loading…
Reference in New Issue
Block a user