Skip to content

Commit 5d4a262

Browse files
authored
Merge pull request #252 from eduNEXT/mgs/reg-form-tpa-overrides
Prefill custom fields in the registration form with TPA data.
2 parents e82c8d1 + 912ed6a commit 5d4a262

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lms/envs/common.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3789,6 +3789,12 @@ def _high_priority_queue(settings):
37893789

37903790
REGISTRATION_EXTENSION_FORM = None
37913791

3792+
# .. setting_name: REGISTRATION_EXTENSION_FORM_FIELDS_TPA_OVERRIDES
3793+
# .. setting_default: []
3794+
# .. setting_description: List of custom fields included in the registriation
3795+
# form extension to be prefilled with third party auth data.
3796+
REGISTRATION_EXTENSION_FORM_FIELDS_TPA_OVERRIDES = []
3797+
37923798
# Identifier included in the User Agent from open edX mobile apps.
37933799
MOBILE_APP_USER_AGENT_REGEXES = [
37943800
r'edX/org.edx.mobile',

openedx/core/djangoapps/user_authn/views/registration_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ def _apply_third_party_auth_overrides(self, request, form_desc):
10781078
) or current_provider.sync_learner_profile_data
10791079
)
10801080

1081-
for field_name in self.DEFAULT_FIELDS + self.EXTRA_FIELDS:
1081+
for field_name in self.DEFAULT_FIELDS + self.EXTRA_FIELDS + settings.REGISTRATION_EXTENSION_FORM_FIELDS_TPA_OVERRIDES:
10821082
if field_name in field_overrides:
10831083
form_desc.override_field_properties(
10841084
field_name, default=field_overrides[field_name]

0 commit comments

Comments
 (0)