diff options
author | Kim Alvefur <zash@zash.se> | 2017-07-28 13:15:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-07-28 13:15:29 +0200 |
commit | 8dad96d3f6e88e59ed6cd84a62192b15b3374145 (patch) | |
tree | e8ab717facc4069414f7377ed320eeac03dccc66 /core | |
parent | 239f4bd260a50271572c763403152e11b3fd6381 (diff) | |
download | prosody-8dad96d3f6e88e59ed6cd84a62192b15b3374145.tar.gz prosody-8dad96d3f6e88e59ed6cd84a62192b15b3374145.zip |
core.usermanager, various modules: Disconnect other resources on password change (thanks waqas) (fixes #512)
Diffstat (limited to 'core')
-rw-r--r-- | core/usermanager.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua index d5132662..f795e8ae 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -76,8 +76,12 @@ local function get_password(username, host) 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) |