Software /
code /
prosody-modules
Changeset
321:661f64627fed
mod_post_msg: Add compatibility with usermanager in 0.7
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 27 Jan 2011 17:36:58 +0100 |
parents | 320:8d4f3cd41f82 |
children | 322:637dc0a04052 |
files | mod_post_msg/mod_post_msg.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_post_msg/mod_post_msg.lua Thu Jan 27 17:30:48 2011 +0100 +++ b/mod_post_msg/mod_post_msg.lua Thu Jan 27 17:36:58 2011 +0100 @@ -24,6 +24,14 @@ return r end; +--COMPAT 0.7 +if not test_password then + local validate_credentials = require "core.usermanager".validate_credentials; + test_password = function(user, host, password) + return validate_credentials(host, user, password) + end +end + local function http_response(code, message, extra_headers) local response = { status = code .. " " .. message;