Software /
code /
prosody
Changeset
8488:95706e0f19fc
mod_register_ibr: Allow modules that do pre-registration checks to specify a reason for rejection
The current hardcoded text may not always be accurate
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 27 Dec 2017 00:44:21 +0100 |
parents | 8487:91f6815de26a |
children | 8489:fc8ef0943b60 |
files | plugins/mod_register_ibr.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_register_ibr.lua Wed Dec 27 00:42:57 2017 +0100 +++ b/plugins/mod_register_ibr.lua Wed Dec 27 00:44:21 2017 +0100 @@ -147,7 +147,7 @@ module:fire_event("user-registering", user); if not user.allowed then log("debug", "Registration disallowed by module"); - session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is forbidden.")); + session.send(st.error_reply(stanza, "modify", "not-acceptable", user.reason)); elseif usermanager_user_exists(username, host) then log("debug", "Attempt to register with existing username"); session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists."));