diff options
Diffstat (limited to 'app/acf-util/logon-controller.lua')
-rw-r--r-- | app/acf-util/logon-controller.lua | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/app/acf-util/logon-controller.lua b/app/acf-util/logon-controller.lua index 18e4e0f..c0fa8b9 100644 --- a/app/acf-util/logon-controller.lua +++ b/app/acf-util/logon-controller.lua @@ -29,27 +29,23 @@ logon = function(self) 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 = self.model.get_userinfo (userid) - self.conf.controller="welcome" - self.conf.action = "" - self.conf.type = "redir" - error (self.conf) + session.id = session.random_hash ( 512) + session.userinfo = self.model.get_userinfo (userid) + self.conf.controller="welcome" + self.conf.action = "" + self.conf.type = "redir" + logevent ("Logon was successful for " .. session.userinfo.username) + error (self.conf) end else - self.conf.controller = "" - self.conf.action = "" - self.conf.prefix = "" - self.conf.type = "redir" - error(self.conf) - end -- If we reach this point, just give them the login page - return ( cfe ({type="form", - option={ script=ENV["SCRIPT_NAME"], - prefix=self.conf.prefix, - controller = self.conf.controller, - action = "logon" }, - value = { userid, password, logon } })) + return ( cfe ({type="form", + option={ script=ENV["SCRIPT_NAME"], + prefix=self.conf.prefix, + controller = self.conf.controller, + action = "logon" }, + value = { userid, password, logon } })) + end end |