LemonLDAP::NG uses Safe jail to evaluate all expressions:
More information about Safe on CPAN
Safe can be very annoying when we use extended functions or custom functions. In this case, you might want to disabling it.
To do this, go in Manager > General Parameters > Advanced Parameters > Security > Use Safe Jail and disable it.