From 2390966e9bbdb3e892ac208d3a8755d8f6ecae52 Mon Sep 17 00:00:00 2001 From: adeelehsan Date: Tue, 15 Jan 2019 15:10:02 +0500 Subject: [PATCH] Added logs added username log if unable to authenticate newly created user for 1st time while its account is still inactive. Purpose of log is to find specific useranme inorder to investigagte LERANER-6026 --- common/djangoapps/student/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/djangoapps/student/helpers.py b/common/djangoapps/student/helpers.py index ee7c75b5be..8115bfc540 100644 --- a/common/djangoapps/student/helpers.py +++ b/common/djangoapps/student/helpers.py @@ -415,6 +415,8 @@ def authenticate_new_user(request, username, password): password = normalize_password(password) backend = load_backend(NEW_USER_AUTH_BACKEND) user = backend.authenticate(request=request, username=username, password=password) + if not user: + log.warning("Unable to authenticate user: {username}".format(username=username)) user.backend = NEW_USER_AUTH_BACKEND return user