aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-27 00:44:21 +0100
committerKim Alvefur <zash@zash.se>2017-12-27 00:44:21 +0100
commit9cd0b48f39026fde92befec061b6551f84bc852c (patch)
treefa5294cd8d9953e6a07592cd86d4b299a58ebdd6 /plugins
parent9526273a1bc133a4f34f9caec30a7f5583619547 (diff)
downloadprosody-9cd0b48f39026fde92befec061b6551f84bc852c.tar.gz
prosody-9cd0b48f39026fde92befec061b6551f84bc852c.zip
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register_ibr.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_register_ibr.lua b/plugins/mod_register_ibr.lua
index 4da77b25..6da94937 100644
--- a/plugins/mod_register_ibr.lua
+++ b/plugins/mod_register_ibr.lua
@@ -147,7 +147,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event)
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."));