liquid_feedback_frontend
view app/main/index/_action/login.lua @ 154:6b6c82f9ca9f
speedup member image loading when non set
we can add the location of the default file directy instead of going through another slow request
we can add the location of the default file directy instead of going through another slow request
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Fri Oct 08 15:25:10 2010 +0200 (2010-10-08) |
| parents | ccdf197b3f9b |
| children | f62c61bd912c |
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 db:query{ "UPDATE member SET last_login = now() WHERE id = ?", member.id }
6 app.session:save()
7 slot.select("notice", function()
8 ui.tag{ content = _'Login successful!' }
9 end)
10 trace.debug('User authenticated')
11 else
12 slot.select("error", function()
13 ui.tag{ content = _'Invalid username or password!' }
14 end)
15 trace.debug('User NOT authenticated')
16 return false
17 end
