Software /
code /
prosody
Diff
plugins/mod_register.lua @ 3164:db9def53fe9c
Check in mod_hashpassauth -- works!
author | Jeff Mitchell <jeff@jefferai.org> |
---|---|
date | Wed, 26 May 2010 18:16:58 -0400 |
parent | 2935:4e4d0d899d9d |
child | 3301:772fb30b28fb |
line wrap: on
line diff
--- a/plugins/mod_register.lua Thu May 20 18:06:21 2010 -0400 +++ b/plugins/mod_register.lua Wed May 26 18:16:58 2010 -0400 @@ -35,7 +35,7 @@ local username, host = session.username, session.host; --session.send(st.error_reply(stanza, "cancel", "not-allowed")); --return; - usermanager_set_password(username, host, nil); -- Disable account + usermanager_set_password(username, nil, host); -- Disable account -- FIXME the disabling currently allows a different user to recreate the account -- we should add an in-memory account block mode when we have threading session.send(st.reply(stanza)); @@ -70,7 +70,7 @@ username = nodeprep(table.concat(username)); password = table.concat(password); if username == session.username then - if usermanager_set_password(username, session.host, password) then + if usermanager_set_password(username, password, session.host) then session.send(st.reply(stanza)); else -- TODO unable to write file, file may be locked, etc, what's the correct error?