mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
Fix Register command to respect mod_register's Access option (#2837)
This commit is contained in:
parent
51e7ccc16d
commit
1f2b8adc28
|
@ -478,7 +478,8 @@ update_module(ModuleNameString) ->
|
||||||
%%%
|
%%%
|
||||||
|
|
||||||
register(User, Host, Password) ->
|
register(User, Host, Password) ->
|
||||||
case ejabberd_auth:try_register(User, Host, Password) of
|
{ok, IPRaw} = inet_parse:address(binary_to_list(<<"::ffff:127.0.0.1">>)),
|
||||||
|
case mod_register:try_register(User, Host, Password, IPRaw, <<"en">>) of
|
||||||
ok ->
|
ok ->
|
||||||
{ok, io_lib:format("User ~s@~s successfully registered", [User, Host])};
|
{ok, io_lib:format("User ~s@~s successfully registered", [User, Host])};
|
||||||
{error, exists} ->
|
{error, exists} ->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user