summaryrefslogtreecommitdiffstats
path: root/app/acf-util/logon-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'app/acf-util/logon-model.lua')
-rw-r--r--app/acf-util/logon-model.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/acf-util/logon-model.lua b/app/acf-util/logon-model.lua
index 8fa9e12..3644a09 100644
--- a/app/acf-util/logon-model.lua
+++ b/app/acf-util/logon-model.lua
@@ -34,15 +34,15 @@ end
-- Log on new user if possible and set up userinfo in session
-- if we fail, we leave the session alone (don't log out)
-logon = function (self, clientdata, ip_addr, sessiondir, sessiondata)
+logon = function (self, userid, password, ip_addr, sessiondir, sessiondata)
-- Check to see if we can login this user id / ip addr
- local countevent = session.count_events(sessiondir, clientdata.userid, session.hash_ip_addr(ip_addr))
+ local countevent = session.count_events(sessiondir, userid, session.hash_ip_addr(ip_addr))
if countevent then
- session.record_event(sessiondir, clientdata.userid, session.hash_ip_addr(ip_addr))
+ session.record_event(sessiondir, userid, session.hash_ip_addr(ip_addr))
end
- if false == countevent and clientdata.userid and clientdata.password then
- if auth.authenticate (self, clientdata.userid, clientdata.password) then
+ if false == countevent and userid and password then
+ if auth.authenticate (self, userid, password) then
-- We have a successful login, change sessiondata
-- for some reason, can't call this function or it skips rest of logon
-- logout(sessiondir, sessiondata)
@@ -54,12 +54,12 @@ logon = function (self, clientdata, ip_addr, sessiondir, sessiondata)
end
--]]
sessiondata.id = session.random_hash(512)
- local t = auth.get_userinfo (self, clientdata.userid)
+ local t = auth.get_userinfo (self, userid)
sessiondata.userinfo = t or {}
return cfe({ type="boolean", value=true, label="Logon Success" })
else
-- We have a bad login, log the event
- session.record_event(sessiondir, clientdata.userid, session.hash_ip_addr(ip_addr))
+ session.record_event(sessiondir, userid, session.hash_ip_addr(ip_addr))
end
end
return cfe({ type="boolean", value=false, label="Logon Success" })