liquid_feedback_frontend

view app/main/index/_action/login.lua @ 174:f62c61bd912c

Made saving of last_login configurable
author bsw
date Sun Oct 31 00:35:11 2010 +0200 (2010-10-31)
parents ccdf197b3f9b
children 5e35add677ee
line source
1 local member = Member:by_login_and_password(param.get('login'), param.get('password'))
3 if member then
4 app.session.member = member
5 if config.last_login_enabled then
6 db:query{ "UPDATE member SET last_login = now() WHERE id = ?", member.id }
7 end
8 app.session:save()
9 slot.select("notice", function()
10 ui.tag{ content = _'Login successful!' }
11 end)
12 trace.debug('User authenticated')
13 else
14 slot.select("error", function()
15 ui.tag{ content = _'Invalid username or password!' }
16 end)
17 trace.debug('User NOT authenticated')
18 return false
19 end

Impressum / About Us