aboutsummaryrefslogtreecommitdiffstats
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
commit9f230cc4699d56c32875cdbc9706ac9dcba866d3 (patch)
treefa5294cd8d9953e6a07592cd86d4b299a58ebdd6
parent9f6611dab7e35dede36be944dada836dd162b73c (diff)
downloadprosody-9f230cc4699d56c32875cdbc9706ac9dcba866d3.tar.gz
prosody-9f230cc4699d56c32875cdbc9706ac9dcba866d3.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
-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."));