fix: Log the set password when creating users

Closes #1894
This commit is contained in:
Jade Ellis
2026-07-02 16:41:33 +01:00
parent 4f72326b07
commit d4f6c053bc
+5 -5
View File
@@ -54,16 +54,16 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
.determine_registration_user_id(Some(username), None, None)
.await?;
let password = HashedPassword::new(
&password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH)),
)?;
let password =
&password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH));
self.services
.users
.create_local_account(&user_id, password, None)
.create_local_account(&user_id, HashedPassword::new(password)?, None)
.await;
self.write_str(&format!("Created user {user_id}")).await
self.write_str(&format!("Created user {user_id} with password `{password}`"))
.await
}
pub(super) async fn deactivate(&self, no_leave_rooms: bool, user_id: String) -> Result {