# HG changeset patch # User Kim Alvefur # Date 1385851059 -3600 # Node ID c669cb78b2933acfa7ef9b9fd025f27da395cb67 # Parent 59332e0bfbdce4dfb093b68f61075d0cd276e5b7 mod_register_web: Fire user-registering event like mod_register diff -r 59332e0bfbdc -r c669cb78b293 mod_register_web/mod_register_web.lua --- a/mod_register_web/mod_register_web.lua Sat Nov 30 23:36:41 2013 +0100 +++ b/mod_register_web/mod_register_web.lua Sat Nov 30 23:37:39 2013 +0100 @@ -117,6 +117,11 @@ if usermanager.user_exists(prepped_username, module.host) then return nil, "Username already taken"; end + local registering = { username = username , host = host, allowed = true } + module:fire_event("user-registering", registering); + if not registering.allowed then + return nil, "Registration not allowed"; + end local ok, err = usermanager.create_user(prepped_username, form.password, module.host); if ok then local extra_data = {};