@@ -22,6 +22,9 @@ pub struct SiteConfig {
2222 /// Whether password registration is enabled.
2323 pub password_registration_enabled : bool ,
2424
25+ /// Whether a valid email address is required for password registrations.
26+ pub password_registration_email_required : bool ,
27+
2528 /// Whether registration tokens are required for password registrations.
2629 pub registration_token_required : bool ,
2730
@@ -59,6 +62,7 @@ pub fn doc(operation: TransformOperation) -> TransformOperation {
5962 server_name : "example.com" . to_owned ( ) ,
6063 password_login_enabled : true ,
6164 password_registration_enabled : true ,
65+ password_registration_email_required : true ,
6266 registration_token_required : true ,
6367 email_change_allowed : true ,
6468 displayname_change_allowed : true ,
@@ -80,6 +84,7 @@ pub async fn handler(
8084 server_name : site_config. server_name ,
8185 password_login_enabled : site_config. password_login_enabled ,
8286 password_registration_enabled : site_config. password_registration_enabled ,
87+ password_registration_email_required : site_config. password_registration_email_required ,
8388 registration_token_required : site_config. registration_token_required ,
8489 email_change_allowed : site_config. email_change_allowed ,
8590 displayname_change_allowed : site_config. displayname_change_allowed ,
0 commit comments