diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index 6cc3a0cea..829d2114f 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -832,9 +832,16 @@ copyLegacy( const QVariantMap& source, const QString& sourceKey, QVariantMap& ta { if ( source.contains( sourceKey ) ) { - const QVariant legacyValue = source.value( sourceKey ); - cWarning() << "Legacy *users* key" << sourceKey << "overrides hostname-settings."; - target.insert( targetKey, legacyValue ); + if ( target.contains( targetKey ) ) + { + cWarning() << "Legacy *users* key" << sourceKey << "ignored."; + } + else + { + const QVariant legacyValue = source.value( sourceKey ); + cWarning() << "Legacy *users* key" << sourceKey << "overrides hostname-settings."; + target.insert( targetKey, legacyValue ); + } } }