thrownewLDAPUserCreationException("Error while adding entry to LDAP for username: ".$username.' Error: '.ldap_error($connection),ldap_errno($connection));
}
return$newUserEntry;
}catch(LDAPUserCreationException$e){
throw$e;
}catch(Exception$e){
throw$e;
}
}
/**
* Check if a recovery email address is available (not already taken by another user).