diff --git a/pkg/models/users.go b/pkg/models/users.go index 51b6ede2a..84a7101da 100644 --- a/pkg/models/users.go +++ b/pkg/models/users.go @@ -27,6 +27,9 @@ import ( // flows acting on behalf of disabled accounts (e.g. user deletion), and the // event only needs the principal as it authenticated. func doerFromAuth(a web.Auth) *user.User { + if a == nil { + return nil + } if u, is := a.(*user.User); is { return u }