Skip to content
Snippets Groups Projects
Commit c79afa5e authored by bmedx's avatar bmedx Committed by Alex Dusenbery
Browse files

Fix PLAT-2123- Bug with retiring user's original_email being hashed

parent a84884ff
No related branches found
Tags release-2020-11-25-04.25
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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment