marketing_emails: Ask for user's consent at sign-up.

This commit is contained in:
Eeshan Garg
2021-08-16 16:33:33 -02:30
committed by Tim Abbott
parent 56f7282096
commit c9861b3c74
8 changed files with 108 additions and 0 deletions

View File

@@ -648,6 +648,7 @@ def do_create_user(
realm_creation: bool = False,
*,
acting_user: Optional[UserProfile],
enable_marketing_emails: bool = True,
) -> UserProfile:
user_profile = create_user(
@@ -665,6 +666,7 @@ def do_create_user(
default_events_register_stream=default_events_register_stream,
default_all_public_streams=default_all_public_streams,
source_profile=source_profile,
enable_marketing_emails=enable_marketing_emails,
)
event_time = user_profile.date_joined