Software /
code /
prosody
Changeset
5166:72cdc2d4e15e
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 01 Oct 2012 20:15:39 +0100 |
parents | 5164:12f5a3438090 (current diff) 5165:39bb9344f194 (diff) |
children | 5172:3b93f92c613a |
files | |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_register.lua Sat Sep 29 17:07:50 2012 +0100 +++ b/plugins/mod_register.lua Mon Oct 01 20:15:39 2012 +0100 @@ -223,6 +223,12 @@ local host = module.host; if not username or username == "" then session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid.")); + return true; + end + local user = { username = username , host = host, allowed = true } + module:fire_event("user-registering", user); + if not user.allowed then + session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is forbidden.")); elseif usermanager_user_exists(username, host) then session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); else