Changeset

8583:9918f324a0be

mod_register_ibr: Include reason for rejection of registration in debug log
author Kim Alvefur <zash@zash.se>
date Sat, 10 Mar 2018 02:21:23 +0100
parents 8582:6a2366759974
children 8584:e3d953481f7d
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	Sat Mar 10 00:08:21 2018 +0100
+++ b/plugins/mod_register_ibr.lua	Sat Mar 10 02:21:23 2018 +0100
@@ -146,7 +146,7 @@
 					local user = { username = username , host = host, additional = data, ip = session.ip, session = session, allowed = true }
 					module:fire_event("user-registering", user);
 					if not user.allowed then
-						log("debug", "Registration disallowed by module");
+						log("debug", "Registration disallowed by module: %s", user.reason or "no reason given");
 						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");