# HG changeset patch # User Kim Alvefur # Date 1296146218 -3600 # Node ID 661f64627fedd0ef12e80771713abdcd47b39c9e # Parent 8d4f3cd41f8261f9cedef59bb6174716f4b94449 mod_post_msg: Add compatibility with usermanager in 0.7 diff -r 8d4f3cd41f82 -r 661f64627fed mod_post_msg/mod_post_msg.lua --- 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;