Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 5666:c1e1b265ee82
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Jun 2013 14:37:02 +0200 |
parent | 5662:685d46ec352b |
parent | 5665:da1881e1b35b |
child | 5674:ebdbf4cf0b2f |
comparison
equal
deleted
inserted
replaced
5664:4f499eb63c04 | 5666:c1e1b265ee82 |
---|---|
989 | 989 |
990 function def_env.user:password(jid, password) | 990 function def_env.user:password(jid, password) |
991 local username, host = jid_split(jid); | 991 local username, host = jid_split(jid); |
992 if not hosts[host] then | 992 if not hosts[host] then |
993 return nil, "No such host: "..host; | 993 return nil, "No such host: "..host; |
994 elseif um.user_exists(username, host) then | 994 elseif not um.user_exists(username, host) then |
995 return nil, "No such user"; | 995 return nil, "No such user"; |
996 end | 996 end |
997 local ok, err = um.set_password(username, password, host); | 997 local ok, err = um.set_password(username, password, host); |
998 if ok then | 998 if ok then |
999 return true, "User password changed"; | 999 return true, "User password changed"; |