aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/usermanager.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index 55faa0c9..e3b9b797 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -174,7 +174,13 @@ local function set_roles(jid, host, roles)
local authz_provider = (host ~= "*" and hosts[host].authz) or global_authz_provider;
if actor_user and actor_host == host then -- Local user
- return authz_provider.set_user_roles(actor_user, roles)
+ local ok, err = authz_provider.set_user_roles(actor_user, roles);
+ if ok then
+ prosody.events.fire_event("user-roles-changed", {
+ username = actor_user, host = actor_host
+ });
+ end
+ return ok, err;
else -- Remote entity
return authz_provider.set_jid_roles(jid, roles)
end