Mercurial > prosody-modules
diff mod_register_web/mod_register_web.lua @ 1238:752285859607
mod_register_web: Use correct variables
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 30 Nov 2013 23:46:54 +0100 |
parents | c669cb78b293 |
children | cc5cbeeb9fc7 |
line wrap: on
line diff
--- a/mod_register_web/mod_register_web.lua Sat Nov 30 23:37:39 2013 +0100 +++ b/mod_register_web/mod_register_web.lua Sat Nov 30 23:46:54 2013 +0100 @@ -117,7 +117,7 @@ if usermanager.user_exists(prepped_username, module.host) then return nil, "Username already taken"; end - local registering = { username = username , host = host, allowed = true } + local registering = { username = prepped_username , host = module.host, allowed = true } module:fire_event("user-registering", registering); if not registering.allowed then return nil, "Registration not allowed"; @@ -131,7 +131,7 @@ extra_data[field] = field_value; end end - if next(first) ~= nil then + if next(extra_data) ~= nil then datamanager.store(prepped_username, module.host, "account_details", extra_data); end module:fire_event("user-registered", {