From efde5349ff87afac3ec2a2378bdf4624cf12fa05 Mon Sep 17 00:00:00 2001 From: Taksh Date: Wed, 24 Jun 2026 20:59:06 +0530 Subject: [PATCH] fix: include user email in inactive-user login error response Restore explicit email assignment for inactive-user auth failures so the login page activation message shows the recipient address again. Fixes #37406 Co-authored-by: Cursor --- openedx/core/djangoapps/user_authn/views/login.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openedx/core/djangoapps/user_authn/views/login.py b/openedx/core/djangoapps/user_authn/views/login.py index 6a012d8d212d..72c23f9199a1 100644 --- a/openedx/core/djangoapps/user_authn/views/login.py +++ b/openedx/core/djangoapps/user_authn/views/login.py @@ -684,6 +684,8 @@ def login_user(request, api_version="v1"): # pylint: disable=too-many-statement email_or_username_key = "email" if api_version == API_V1 else "email_or_username" email_or_username = request.POST.get(email_or_username_key, None) email_or_username = possibly_authenticated_user.email if possibly_authenticated_user else email_or_username + if error_code == "inactive-user" and user: + email_or_username = user.email response_content["email"] = email_or_username except VulnerablePasswordError as error: response_content = error.get_response()