Software / code / prosody
Comparison
core/usermanager.lua @ 3887:9aa109f8b960
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 |
| parent | 3843:997f699323f6 |
| child | 3982:a20a41e512f8 |
comparison
equal
deleted
inserted
replaced
| 3886:b40fbbd15ba3 | 3887:9aa109f8b960 |
|---|---|
| 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 |