From 228a710f1e4359f65bd53b40b59df4c708e7f123 Mon Sep 17 00:00:00 2001 From: Johan Carlberg Date: Sun, 25 Jan 2026 12:02:19 +0100 Subject: [PATCH] Allow save of inactive users. --- Sources/ManageableUsers/Controllers/AdminController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ManageableUsers/Controllers/AdminController.swift b/Sources/ManageableUsers/Controllers/AdminController.swift index afac3d0..804a856 100644 --- a/Sources/ManageableUsers/Controllers/AdminController.swift +++ b/Sources/ManageableUsers/Controllers/AdminController.swift @@ -117,7 +117,7 @@ public struct AdminController: Sendable where User.SessionID let save = try request.content.decode(Save.self) return try await request.db.withSQLConnection (user: try request.auth.require (BasicUser.self)) { connection in - guard (try await User.find (userId, on: connection)) != nil else { + guard (try await User.fetch (userId, on: connection)) != nil else { throw Abort (.notFound) } guard !save.email.isEmpty && !save.fullname.isEmpty else {