Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 8192:4354f556c5db
core.usermanager, various modules: Disconnect other resources on password change (thanks waqas) (fixes #512)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 28 Jul 2017 13:15:29 +0200 |
parent | 8126:60f6f7ddd2ce |
child | 8201:a0ad62a269df |
child | 8590:4b5a00fffb22 |
comparison
equal
deleted
inserted
replaced
8191:d43012448c1f | 8192:4354f556c5db |
---|---|
1028 if not hosts[host] then | 1028 if not hosts[host] then |
1029 return nil, "No such host: "..host; | 1029 return nil, "No such host: "..host; |
1030 elseif not um.user_exists(username, host) then | 1030 elseif not um.user_exists(username, host) then |
1031 return nil, "No such user"; | 1031 return nil, "No such user"; |
1032 end | 1032 end |
1033 local ok, err = um.set_password(username, password, host); | 1033 local ok, err = um.set_password(username, password, host, nil); |
1034 if ok then | 1034 if ok then |
1035 return true, "User password changed"; | 1035 return true, "User password changed"; |
1036 else | 1036 else |
1037 return nil, "Could not change password for user: "..err; | 1037 return nil, "Could not change password for user: "..err; |
1038 end | 1038 end |