25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

mod_register_web: Don't crash if user exists

Since commit 633b68db11,
ejabberd_auth:try_register/3 returns {error, exists} rather than
{atomic, exists}.

Thanks to Thomas Leister for reporting the issue.
This commit is contained in:
Holger Weiss 2019-06-05 18:28:35 +02:00
parent cd10d87a9c
commit 6c0d6f0774

View File

@ -590,8 +590,8 @@ unregister_account(Username, Host, Password) ->
get_error_text({error, captcha_non_valid}) ->
<<"The captcha you entered is wrong">>;
get_error_text({success, exists, _}) ->
get_error_text({atomic, exists});
get_error_text({atomic, exists}) ->
get_error_text({error, exists});
get_error_text({error, exists}) ->
<<"The account already exists">>;
get_error_text({error, password_incorrect}) ->
<<"Incorrect password">>;