Commit 818c22a7 authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Even if LDAPUpdateOnly is set, new aliases should be created

LDAPUpdateOnly normally prevents the creation of new users in
_import_user; however, in the case of importing secondary email address,
while a "user" is created, it is functionally only created to be an
update on an existing user.  As such, allow the user to created.
parent 27c45f66
......@@ -73,6 +73,11 @@ sub _import_user {
$ldap->replace( mail => $address );
$ldap->replace( $_ => [] ) for @{$secondary_attrs};
# Even if we were told to "only update", we should be able to
# create aliases to merge in.
local $RT::LDAPUpdateUsers = $RT::LDAPUpdateOnly;
local $RT::LDAPUpdateOnly = 0;
# Build and import the secondary user
my $data = $self->_build_user_object( ldap_entry => $ldap );
$alt = $self->_import_user(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment