]> Untitled Git - lemmy.git/commitdiff
Invalidate current logins on account deletion. Fixes #1602 (#1603)
authorDessalines <dessalines@users.noreply.github.com>
Fri, 28 May 2021 15:50:52 +0000 (11:50 -0400)
committerGitHub <noreply@github.com>
Fri, 28 May 2021 15:50:52 +0000 (15:50 +0000)
crates/db_queries/src/source/person.rs

index 4624ae191826a43f0ef5344c6dc6c269b99a48b8..a7266aa27c0d799b5b584a7117eb808de5a9fb7a 100644 (file)
@@ -237,7 +237,10 @@ impl Person_ for Person {
 
     // Set the local user info to none
     diesel::update(local_user::table.filter(local_user::person_id.eq(person_id)))
-      .set((local_user::email.eq::<Option<String>>(None),))
+      .set((
+        local_user::email.eq::<Option<String>>(None),
+        local_user::validator_time.eq(naive_now()),
+      ))
       .execute(conn)?;
 
     diesel::update(person.find(person_id))