Commits

Daniel Poelzleithner committed b28f73f

only log last login if enabled in config

this was requested by review, because it's a sensitive information

  • Participants
  • Parent commits 165f4bd

Comments (0)

Files changed (2)

File app/main/index/_action/login.lua

 
 if member then
   app.session.member = member
-  db:query{ "UPDATE member SET last_login = now() WHERE id = ?", member.id }
+  if config.log_last_login then
+    db:query{ "UPDATE member SET last_login = now() WHERE id = ?", member.id }
+  end
   app.session:save()
   slot.select("notice", function()
     ui.tag{ content = _'Login successful!' }

File config/default.lua

 
 config.feature_rss_enabled = false -- feature is broken
 
+config.log_last_login = false -- log the last login time
+
 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
 config.auth_openid_enabled = false
 config.auth_openid_https_as_default = true