Skip to content
Snippets Groups Projects
Commit fd84e3f5 authored by bmedx's avatar bmedx
Browse files

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

parent 330ca36d
No related branches found
Tags release-2021-06-15-13.28
No related merge requests found
......@@ -401,6 +401,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
......@@ -411,7 +412,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