From b18b85670fe5f6c1b6a6c2eafd8c8723f891e91c Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 17 Dec 2010 22:54:34 +0500 Subject: usermanager: Fixed a possible traceback when is_admin() was used on a component. --- core/usermanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3