Skip to content

Commit 217ee01

Browse files
Samuel Racdroidmonkey
authored andcommitted
Fix Proton Pass importer not importing email when there is no username
1 parent 7a5cd61 commit 217ee01

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/format/ProtonPassReader.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ namespace
7373
}
7474

7575
if (loginMap.contains("itemEmail")) {
76-
entry->attributes()->set("login_email", loginMap.value("itemEmail").toString());
76+
// Place the email value as the username if empty, otherwise set it as an attribute
77+
const auto email = loginMap.value("itemEmail").toString();
78+
if (entry->username().isEmpty()) {
79+
entry->setUsername(email);
80+
} else if (!email.isEmpty()) {
81+
entry->attributes()->set("login_email", email);
82+
}
7783
}
7884

7985
// Set the entry url(s)

0 commit comments

Comments
 (0)