You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Fix user registration from CLI
This commit is contained in:
@@ -42,9 +42,11 @@ impl ManageCommand {
|
||||
SC::Register { username, password } => {
|
||||
let config: DatabaseConfig = root.load_config()?;
|
||||
let pool = config.connect().await?;
|
||||
let mut txn = pool.begin().await?;
|
||||
let hasher = Argon2::default();
|
||||
|
||||
let user = register_user(&pool, hasher, username, password).await?;
|
||||
let user = register_user(&mut txn, hasher, username, password).await?;
|
||||
txn.commit().await?;
|
||||
info!(?user, "User registered");
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user