fix: Log the set password when creating users

Closes #1894
This commit is contained in:
Jade Ellis committed 2026-07-02 16:41:33 +01:00
1 parent 4f72326b07
commit d4f6c053bc
1 file changed
+5 -5
+5 -5
View File
@@ -54,16 +54,16 @@ impl crate::Context<'_> {
.determine_registration_user_id(Some(username), None, None) .determine_registration_user_id(Some(username), None, None)
.await?; .await?;
let password = HashedPassword::new( let password =
&password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH)), &password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH));
)?;
self.services self.services
.users .users
.create_local_account(&user_id, password, None) .create_local_account(&user_id, HashedPassword::new(password)?, None)
.await; .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 { pub(super) async fn deactivate(&self, no_leave_rooms: bool, user_id: String) -> Result {