Bypass account creation error when password is empty, caused by extauth

This commit is contained in:
Badlop 2018-05-07 13:02:17 +02:00
parent 46f47db512
commit de85c1718e
1 changed files with 2 additions and 0 deletions

View File

@ -404,6 +404,8 @@ process_user(#xmlel{name = <<"user">>, attrs = Attrs, children = Els},
case ejabberd_auth:try_register(LUser, LServer, Pass) of
ok ->
process_user_els(Els, State#state{user = LUser});
{error, invalid_password} when (Password == <<>>) ->
process_user_els(Els, State#state{user = LUser});
{error, Err} ->
stop("Failed to create user '~s': ~p", [Name, Err])
end