Comparison

plugins/mod_legacyauth.lua @ 1687:0e061ebf565e

mod_legacyauth: Removed useless 'require' call on every login attempt
author Waqas Hussain <waqas20@gmail.com>
date Thu, 13 Aug 2009 16:45:47 +0500
parent 1523:841d61be198f
child 1688:a39a253b5b89
comparison
equal deleted inserted replaced
1667:c7bb2264e3b8 1687:0e061ebf565e
45 :tag("resource"):up()); 45 :tag("resource"):up());
46 return true; 46 return true;
47 else 47 else
48 username, password, resource = t_concat(username), t_concat(password), t_concat(resource); 48 username, password, resource = t_concat(username), t_concat(password), t_concat(resource);
49 local reply = st.reply(stanza); 49 local reply = st.reply(stanza);
50 require "core.usermanager"
51 if usermanager.validate_credentials(session.host, username, password) then 50 if usermanager.validate_credentials(session.host, username, password) then
52 -- Authentication successful! 51 -- Authentication successful!
53 local success, err = sessionmanager.make_authenticated(session, username); 52 local success, err = sessionmanager.make_authenticated(session, username);
54 if success then 53 if success then
55 local err_type, err_msg; 54 local err_type, err_msg;