diff options
Diffstat (limited to 'src/mod_register.erl')
-rw-r--r-- | src/mod_register.erl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mod_register.erl b/src/mod_register.erl index 32dd2fc1c..432b8421a 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -114,13 +114,12 @@ process_iq(#iq{from = From, to = To} = IQ, Source) -> end, Server = To#jid.lserver, Access = mod_register_opt:access_remove(Server), - Remove = case acl:match_rule(Server, Access, From) of - deny -> deny; - allow when From#jid.lserver /= Server -> - deny; - allow -> - check_access(From#jid.luser, Server, Source) - end, + Remove = case {acl:match_rule(Server, Access, From), From#jid.lserver} of + {allow, Server} -> + allow; + {_, _} -> + deny + end, process_iq(IQ, Source, IsCaptchaEnabled, Remove == allow). process_iq(#iq{type = set, lang = Lang, @@ -636,10 +635,10 @@ mod_doc() -> [{access, #{value => ?T("AccessName"), desc => - ?T("Specify rules to restrict what usernames can be registered and " - "unregistered. If a rule returns 'deny' on the requested username, " - "registration and unregistration of that user name is denied. " - "There are no restrictions by default.")}}, + ?T("Specify rules to restrict what usernames can be registered. " + "If a rule returns 'deny' on the requested username, " + "registration of that user name is denied. There are no " + "restrictions by default.")}}, {access_from, #{value => ?T("AccessName"), desc => |