From 478ba3ce3d2f0f51e9867b82409d064b137c4479 Mon Sep 17 00:00:00 2001 From: Nathan Angelacos Date: Sat, 22 Dec 2007 21:06:43 +0000 Subject: logon works - but session table is not saved yet git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@450 ab2d0c66-481e-0410-8bed-d214d4d58bed --- app/acf-util/logon-controller.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'app/acf-util/logon-controller.lua') diff --git a/app/acf-util/logon-controller.lua b/app/acf-util/logon-controller.lua index 676736f..bdc2327 100644 --- a/app/acf-util/logon-controller.lua +++ b/app/acf-util/logon-controller.lua @@ -25,18 +25,19 @@ logon = function(self) if clientdata.userid and clientdata.password then local t = self.model.logon(self,clientdata.userid,clientdata.password) - + if t == nil then userid.value = self.clientdata.userid userid.errtxt = "There was a problem logging in" else -- the login was successful - give them a new session, and redir to logged in - session.id = session.random_hash ( 512) - session.userinfo = t or {} + self.sessiondata.id = session.random_hash ( 512) + self.sessiondata.userinfo = t or {} + self.conf.prefix="/" self.conf.controller="welcome" - self.conf.action = "" + self.conf.action = "read" self.conf.type = "redir" - logevent ("Logon was successful for " .. session.userinfo.username or "" ) + logevent ("Logon was successful for " .. self.sessiondata.userinfo.username or "" ) error (self.conf) end end -- cgit v1.2.3