Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable custom_reg_form capability #253

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions eox_core/edxapp_wrapper/backends/users_m_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
REGISTER_USER as post_register # pylint: disable=import-error
from openedx.core.djangoapps.user_authn.views.registration_form import ( # pylint: disable=import-error
AccountCreationForm,
get_registration_extension_form,
)
from openedx.core.djangolib.oauth2_retirement_utils import \
retire_dot_oauth2_models # pylint: disable=import-error,unused-import
Expand Down Expand Up @@ -133,9 +134,9 @@ def create_edxapp_user(*args, **kwargs):

# Go ahead and create the new user
with transaction.atomic():
# In theory is possible to extend the registration form with a custom app
# Is possible to extend the registration form with a custom app
# An example form app for this can be found at http://github.com/open-craft/custom-form-app
# form = get_registration_extension_form(data=params)
custom_form = get_registration_extension_form(data=kwargs)
# if not form:
form = EdnxAccountCreationForm(
data=kwargs,
Expand All @@ -144,7 +145,7 @@ def create_edxapp_user(*args, **kwargs):
extended_profile_fields=extended_profile_fields,
# enforce_password_policy=enforce_password_policy,
)
(user, profile, registration) = do_create_account(form) # pylint: disable=unused-variable
(user, profile, registration) = do_create_account(form, custom_form) # pylint: disable=unused-variable

site = kwargs.pop("site", False)
if site:
Expand Down
Loading