aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_invites_adhoc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_invites_adhoc.lua')
-rw-r--r--plugins/mod_invites_adhoc.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_invites_adhoc.lua b/plugins/mod_invites_adhoc.lua
index 4554d919..bd6f0c2e 100644
--- a/plugins/mod_invites_adhoc.lua
+++ b/plugins/mod_invites_adhoc.lua
@@ -45,7 +45,11 @@ local invite_result_form = dataforms.new({
local function may_invite_new_users(jid)
if usermanager.get_roles then
local user_roles = usermanager.get_roles(jid, module.host);
- if not user_roles then return; end
+ if not user_roles then
+ -- User has no roles we can check, just return default
+ return allow_user_invites;
+ end
+
if user_roles["prosody:admin"] then
return true;
end