Fix Proton Pass importer not importing email when there is no username

This commit is contained in:
Samuel Rac 2025-03-13 14:11:58 +01:00 committed by Jonathan White
parent 7a5cd6105c
commit 217ee01572

View file

@ -73,7 +73,13 @@ namespace
}
if (loginMap.contains("itemEmail")) {
entry->attributes()->set("login_email", loginMap.value("itemEmail").toString());
// Place the email value as the username if empty, otherwise set it as an attribute
const auto email = loginMap.value("itemEmail").toString();
if (entry->username().isEmpty()) {
entry->setUsername(email);
} else if (!email.isEmpty()) {
entry->attributes()->set("login_email", email);
}
}
// Set the entry url(s)