summaryrefslogtreecommitdiff
path: root/src/mod_shared_roster_ldap.erl
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2018-01-29 17:25:31 +0100
committerPaweł Chmielowski <pchmielowski@process-one.net>2018-01-29 17:25:31 +0100
commitd2974cf48a1bc22c7adfedc91bafdd80c8494ee0 (patch)
treea7500fdd6ab2ef87953056dfe6779c84da36138f /src/mod_shared_roster_ldap.erl
parentDon't return undefined from ejabberd_config:get_myhosts() (diff)
Fix processing of ldap_memberattr_format_re option
This makes sure that "" value is handled as before options processing overhaul. This fixed ldap shared roster testcase
Diffstat (limited to 'src/mod_shared_roster_ldap.erl')
-rw-r--r--src/mod_shared_roster_ldap.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl
index 745430ca..04db34ef 100644
--- a/src/mod_shared_roster_ldap.erl
+++ b/src/mod_shared_roster_ldap.erl
@@ -575,7 +575,11 @@ mod_opt_type(ldap_memberattr_format) ->
fun iolist_to_binary/1;
mod_opt_type(ldap_memberattr_format_re) ->
fun (S) ->
- Re = iolist_to_binary(S), {ok, MP} = re:compile(Re), MP
+ Re = iolist_to_binary(S),
+ case Re of
+ <<>> -> <<>>;
+ _ -> {ok, MP} = re:compile(Re), MP
+ end
end;
mod_opt_type(ldap_rfilter) ->
opt_type(ldap_rfilter);