From fa4f2bceacb27820da6335e334fd28d33134bf89 Mon Sep 17 00:00:00 2001 From: Horilla Date: Mon, 17 Mar 2025 16:54:14 +0530 Subject: [PATCH] [UPDT] HORILLA LDAP: Updated the user name as email after importing the user --- horilla_ldap/management/commands/import_ldap_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horilla_ldap/management/commands/import_ldap_users.py b/horilla_ldap/management/commands/import_ldap_users.py index 35ff0bd32..89da4717e 100644 --- a/horilla_ldap/management/commands/import_ldap_users.py +++ b/horilla_ldap/management/commands/import_ldap_users.py @@ -139,7 +139,7 @@ class Command(BaseCommand): user = User.objects.get( Q(username=email) | Q(username=user_id) | Q(email=email) ) - user.username = user_id + user.username = email user.set_password(ldap_password) # Hash and store password securely user.save() action = "Updated"