fix: add additional kwargs to USER_RETIRE_LMS (#38078)

This commit is contained in:
Kira Miller
2026-03-04 14:02:21 -07:00
committed by GitHub
parent f802f578e5
commit e7377d46f1
3 changed files with 23 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ from django.dispatch import Signal
USER_RETIRE_MAILINGS = Signal()
# Signal to retire LMS critical information
# providing_args=["user"]
# providing_args=["user", "retired_username", "retired_email"]
USER_RETIRE_LMS_CRITICAL = Signal()
# Signal to retire LMS misc information

View File

@@ -1170,7 +1170,12 @@ class AccountRetirementView(ViewSet):
UnregisteredLearnerCohortAssignments.delete_by_user_value(original_email, field="email")
# This signal allows code in higher points of LMS to retire the user as necessary
USER_RETIRE_LMS_CRITICAL.send(sender=self.__class__, user=user)
USER_RETIRE_LMS_CRITICAL.send(
sender=self.__class__,
user=user,
retired_username=retired_username,
retired_email=retired_email,
)
user.first_name = ""
user.last_name = ""