From fc0aff20cfcc30350d87994ee518fd1bec7ce088 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20K=C3=B6sters?= <timo@koesters.xyz>
Date: Sat, 11 Feb 2023 12:43:41 +0100
Subject: [PATCH] fix: allow reactivation of users using reset-password admin
 command

---
 src/service/admin/mod.rs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs
index 77f351a9..b6609e13 100644
--- a/src/service/admin/mod.rs
+++ b/src/service/admin/mod.rs
@@ -556,7 +556,6 @@ impl Service {
 
                 // Check if the specified user is valid
                 if !services().users.exists(&user_id)?
-                    || services().users.is_deactivated(&user_id)?
                     || user_id
                         == UserId::parse_with_server_name(
                             "conduit",
@@ -565,7 +564,7 @@ impl Service {
                         .expect("conduit user exists")
                 {
                     return Ok(RoomMessageEventContent::text_plain(
-                        "The specified user does not exist or is deactivated!",
+                        "The specified user does not exist!",
                     ));
                 }
 
@@ -600,12 +599,12 @@ impl Service {
                 };
                 if user_id.is_historical() {
                     return Ok(RoomMessageEventContent::text_plain(format!(
-                        "userid {user_id} is not allowed due to historical"
+                        "Userid {user_id} is not allowed due to historical"
                     )));
                 }
                 if services().users.exists(&user_id)? {
                     return Ok(RoomMessageEventContent::text_plain(format!(
-                        "userid {user_id} already exists"
+                        "Userid {user_id} already exists"
                     )));
                 }
                 // Create user