Skip to content

Commit 93b991e

Browse files
committed
Mark the user as deactivated in the user deactivation job
1 parent b72b836 commit 93b991e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/tasks/src/user.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,21 @@ impl RunnableJob for DeactivateUserJob {
4242
.context("User not found")
4343
.map_err(JobError::fail)?;
4444

45-
// Let's first lock the user
45+
// Let's first lock & deactivate the user
4646
let user = repo
4747
.user()
4848
.lock(&clock, user)
4949
.await
5050
.context("Failed to lock user")
5151
.map_err(JobError::retry)?;
5252

53+
let user = repo
54+
.user()
55+
.deactivate(&clock, user)
56+
.await
57+
.context("Failed to deactivate user")
58+
.map_err(JobError::retry)?;
59+
5360
// Kill all sessions for the user
5461
let n = repo
5562
.browser_session()

0 commit comments

Comments
 (0)