aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-03-19 14:12:40 +0000
committerMatthew Wild <mwild1@gmail.com>2020-03-19 14:12:40 +0000
commit8f5d92c15e9a26ca360454df6cab03f21c8eba39 (patch)
treee01decc40862d96012abe5984f6e03bd69e4673e
parentc0b0c818027d7070e7d1539a31e5d9fce2cb9f73 (diff)
downloadprosody-8f5d92c15e9a26ca360454df6cab03f21c8eba39.tar.gz
prosody-8f5d92c15e9a26ca360454df6cab03f21c8eba39.zip
usermanager: Fix traceback when checking admin status of host-only JIDs (fixes #1508)
-rw-r--r--core/usermanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index aced0379..11707450 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -149,7 +149,7 @@ local function get_roles(jid, host)
local authz_provider = (host ~= "*" and hosts[host].authz) or global_authz_provider;
- if actor_host == host then -- Local user
+ if actor_user and actor_host == host then -- Local user
roles = authz_provider.get_user_roles(actor_user);
else -- Remote user/JID
roles = authz_provider.get_jid_roles(jid);