Mercurial > prosody-hg
comparison core/usermanager.lua @ 3768:01cc9cbcbd52
usermanager: Fixed a possible traceback when is_admin() was used on a component.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 17 Dec 2010 22:54:34 +0500 |
| parents | bd5c6c333ee7 |
| children | a20a41e512f8 |
comparison
equal
deleted
inserted
replaced
| 3767:3ba97d1d7a62 | 3768:01cc9cbcbd52 |
|---|---|
| 118 log("error", "Global option 'admins' is not a list"); | 118 log("error", "Global option 'admins' is not a list"); |
| 119 end | 119 end |
| 120 end | 120 end |
| 121 | 121 |
| 122 -- Still not an admin, check with auth provider | 122 -- Still not an admin, check with auth provider |
| 123 if not is_admin and host ~= "*" and hosts[host].users.is_admin then | 123 if not is_admin and host ~= "*" and hosts[host].users and hosts[host].users.is_admin then |
| 124 is_admin = hosts[host].users.is_admin(jid); | 124 is_admin = hosts[host].users.is_admin(jid); |
| 125 end | 125 end |
| 126 return is_admin or false; | 126 return is_admin or false; |
| 127 end | 127 end |
| 128 | 128 |
