aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-12-17 22:54:34 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-12-17 22:54:34 +0500
commitb18b85670fe5f6c1b6a6c2eafd8c8723f891e91c (patch)
treef12a7ba5a29a5a9b071652c3544fb5151a8b0018
parente7513fcc4dbd99ce14ce83875c97f3047604b0d5 (diff)
downloadprosody-b18b85670fe5f6c1b6a6c2eafd8c8723f891e91c.tar.gz
prosody-b18b85670fe5f6c1b6a6c2eafd8c8723f891e91c.zip
usermanager: Fixed a possible traceback when is_admin() was used on a component.
-rw-r--r--core/usermanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index c49bf428..1aea0de9 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -120,7 +120,7 @@ function is_admin(jid, host)
end
-- Still not an admin, check with auth provider
- if not is_admin and host ~= "*" and hosts[host].users.is_admin then
+ if not is_admin and host ~= "*" and hosts[host].users and hosts[host].users.is_admin then
is_admin = hosts[host].users.is_admin(jid);
end
return is_admin or false;