core/usermanager.lua
changeset 8195 4354f556c5db
parent 7180 1295e14614f4
child 8558 4f0f5b49bb03
--- a/core/usermanager.lua	Sun Aug 06 13:27:47 2017 +0200
+++ b/core/usermanager.lua	Fri Jul 28 13:15:29 2017 +0200
@@ -76,8 +76,12 @@
 	return hosts[host].users.get_password(username);
 end
 
-local function set_password(username, password, host)
-	return hosts[host].users.set_password(username, password);
+local function set_password(username, password, host, resource)
+	local ok, err = hosts[host].users.set_password(username, password);
+	if ok then
+		prosody.events.fire_event("user-password-changed", { username = username, host = host, resource = resource });
+	end
+	return ok, err;
 end
 
 local function user_exists(username, host)