From bf79061f0802a84d3d90f6df9b80ed705b873aab Mon Sep 17 00:00:00 2001 From: Jason Crome Date: Thu, 9 May 2024 11:30:14 -0400 Subject: [PATCH] Always pass import flag within LDAP import When constructing a user object in the LDAP import, the import flag was not passed through as it is elsewhere in the import process. If this flag is needed in the LDAP field mapping, there was no guaranteed availability. Explicitly passing the import argument to _build_user_object ensures that LDAP mappings will always be aware of whether this is a live or test import. --- lib/RT/LDAPImport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RT/LDAPImport.pm b/lib/RT/LDAPImport.pm index 6baf7a1c82e..11f76fab781 100644 --- a/lib/RT/LDAPImport.pm +++ b/lib/RT/LDAPImport.pm @@ -601,7 +601,7 @@ sub _import_users { my $done = 0; my $count = scalar @$users; while (my $entry = shift @$users) { - my $user = $self->_build_user_object( ldap_entry => $entry ); + my $user = $self->_build_user_object( ldap_entry => $entry, import => $args{import} ); $self->_import_user( user => $user, ldap_entry => $entry, import => $args{import} ); $done++; $RT::Logger->debug("Imported $done/$count users");