summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go
index 37e77dd3ba..3c439fff06 100644
--- a/models/user.go
+++ b/models/user.go
@@ -40,7 +40,7 @@ var (
ErrUserHasOrgs = errors.New("User still have membership of organization")
ErrUserAlreadyExist = errors.New("User already exist")
ErrUserNotExist = errors.New("User does not exist")
- ErrUserNotKeyOwner = errors.New("User does not the owner of public key")
+ ErrPublicKeyNotExist = errors.New("Public key does not exist")
ErrEmailAlreadyUsed = errors.New("E-mail already used")
ErrEmailNotExist = errors.New("E-mail does not exist")
ErrEmailNotActivated = errors.New("E-mail address has not been activated")
@@ -516,7 +516,7 @@ func GetUserByKeyId(keyId int64) (*User, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, ErrUserNotKeyOwner
+ return nil, ErrPublicKeyNotExist
}
return user, nil
}