From a92e0df397182f7c9924a3893364fc295de07ef3 Mon Sep 17 00:00:00 2001
From: Waqas Hussain <waqas20@gmail.com>
Date: Thu, 10 Jun 2010 03:54:22 +0500
Subject: mod_legacyauth: Fixed the ordering of parameters passed to
 usermanager.test_password.

---
 plugins/mod_legacyauth.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'plugins')

diff --git a/plugins/mod_legacyauth.lua b/plugins/mod_legacyauth.lua
index 2f163cbb..50566fa6 100644
--- a/plugins/mod_legacyauth.lua
+++ b/plugins/mod_legacyauth.lua
@@ -50,7 +50,7 @@ module:add_iq_handler("c2s_unauthed", "jabber:iq:auth",
 				username = nodeprep(username);
 				resource = resourceprep(resource)
 				local reply = st.reply(stanza);
-				if usermanager.test_password(session.host, username, password) then
+				if usermanager.test_password(username, password, session.host) then
 					-- Authentication successful!
 					local success, err = sessionmanager.make_authenticated(session, username);
 					if success then
-- 
cgit v1.2.3