Add LDAP informations to a new user after the registration

You can use : 
my ($connection, $LDAPServer, $LDAPServerPort ) = $self->_connect();
and use $connection instead of $ldap after in your code.