# HG changeset patch # User Kim Alvefur # Date 1520645994 -3600 # Node ID 9d53134a0b29ddf878c2ee5ad3cbeb47f80409f2 # Parent 9f60905406ba1b0d0d067f3303c73e71f8334f2f mod_register_web: Return reason for rejection if one was provided by another plugin during pre-registration checks diff -r 9f60905406ba -r 9d53134a0b29 mod_register_web/mod_register_web.lua --- a/mod_register_web/mod_register_web.lua Sat Mar 10 02:38:42 2018 +0100 +++ b/mod_register_web/mod_register_web.lua Sat Mar 10 02:39:54 2018 +0100 @@ -127,7 +127,7 @@ local registering = { username = prepped_username , host = module.host, ip = origin.conn:ip(), allowed = true } module:fire_event("user-registering", registering); if not registering.allowed then - return nil, "Registration not allowed"; + return nil, registering.reason or "Registration not allowed"; end if form.confirm_password ~= form.password then return nil, "Passwords don't match";