Ensure a valid identity is provided in public key
continuous-integration/drone/push Build is passing Details

This commit is contained in:
nemunaire 2022-09-08 17:59:52 +02:00
parent 87d60c5fd5
commit 8251fb2f96
1 changed files with 4 additions and 0 deletions

View File

@ -257,6 +257,10 @@ func (k *Key) ReadInfos(u *User) error {
}
}
if std_identity == nil {
return fmt.Errorf("No identity found with %s email address.", u.Email)
}
if std_identity.UserId != nil {
k.Infos["identity"] = std_identity.UserId.Name
k.Infos["email"] = std_identity.UserId.Email