Skip to content
Snippets Groups Projects
Unverified Commit c3ca6778 authored by Brian Mesick's avatar Brian Mesick Committed by GitHub
Browse files

Merge pull request #18183 from edx/bmedx/PLAT-2123

Fix PLAT-2123- Bug with retiring user's original_email being hashed
parents a84884ff fd84e3f5
No related merge requests found
......@@ -406,6 +406,7 @@ class DeactivateLogoutView(APIView):
if verify_user_password_response.status_code != status.HTTP_204_NO_CONTENT:
return verify_user_password_response
with transaction.atomic():
UserRetirementStatus.create_retirement(request.user)
# Unlink LMS social auth accounts
UserSocialAuth.objects.filter(user_id=request.user.id).delete()
# Change LMS password & email
......@@ -416,7 +417,6 @@ class DeactivateLogoutView(APIView):
# Remove the activation keys sent by email to the user for account activation.
Registration.objects.filter(user=request.user).delete()
# Add user to retirement queue.
UserRetirementStatus.create_retirement(request.user)
# Log the user out.
logout(request)
return Response(status=status.HTTP_204_NO_CONTENT)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment