summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go
index a4b753f8e1..720065c3f1 100644
--- a/models/user.go
+++ b/models/user.go
@@ -32,7 +32,6 @@ var (
ErrUserNotExist = errors.New("User does not exist")
ErrEmailAlreadyUsed = errors.New("E-mail already used")
ErrUserNameIllegal = errors.New("User name contains illegal characters")
- ErrKeyNotExist = errors.New("Public key does not exist")
)
// User represents the object of individual and member of organization.
@@ -315,12 +314,12 @@ func DeleteUser(user *User) error {
}
// Delete all SSH keys.
- keys := make([]PublicKey, 0, 10)
+ keys := make([]*PublicKey, 0, 10)
if err = orm.Find(&keys, &PublicKey{OwnerId: user.Id}); err != nil {
return err
}
for _, key := range keys {
- if err = DeletePublicKey(&key); err != nil {
+ if err = DeletePublicKey(key); err != nil {
return err
}
}