diff --git a/src/web/pages/account/register.rs b/src/web/pages/account/register.rs index fbd200392..529901ef4 100644 --- a/src/web/pages/account/register.rs +++ b/src/web/pages/account/register.rs @@ -132,6 +132,8 @@ async fn route_register( Expect(Query(query)): Expect>, PostForm(form): PostForm, ) -> Result { + let is_first_run = services.firstrun.is_first_run(); + if session_store .get::(User::KEY) .await @@ -226,6 +228,13 @@ async fn route_register( terms, validation_errors, }, + | (_, token) if is_first_run => RegisterBody::DetailsPrompt { + username: query.username, + require_email: false, + flow: RegistrationFlowParameters::Trusted { registration_token: token }, + terms, + validation_errors, + }, | (Some(RequestedRegistrationFlow::Untrusted), _) => RegisterBody::DetailsPrompt { username: query.username, require_email: services @@ -252,7 +261,7 @@ async fn route_register( response!(Register::new( context, services.globals.server_name().to_owned(), - services.firstrun.is_first_run(), + is_first_run, body )) }