diff --git a/pkg/cmd/user.go b/pkg/cmd/user.go index 8c4dd796..b1d5939a 100644 --- a/pkg/cmd/user.go +++ b/pkg/cmd/user.go @@ -103,7 +103,7 @@ func getUserFromArg(s *xorm.Session, arg string) *user.User { log.Fatalf("Invalid user id: %s", err) } - u, err := user.GetUserByID(s, id) + u, err := user.GetUserWithEmail(s, &user.User{ID: id}) if err != nil { log.Fatalf("Could not get user: %s", err) } diff --git a/pkg/models/user_delete.go b/pkg/models/user_delete.go index 32b4d14d..f0f67fa1 100644 --- a/pkg/models/user_delete.go +++ b/pkg/models/user_delete.go @@ -167,7 +167,9 @@ func DeleteUser(s *xorm.Session, u *user.User) (err error) { return err } - return notifications.Notify(u, &user.AccountDeletedNotification{}) + return notifications.Notify(u, &user.AccountDeletedNotification{ + User: u, + }) } func ensureNamespaceAdminUser(s *xorm.Session, n *Namespace) (hadUsers bool, err error) {