liquid_feedback_frontend
annotate app/main/index/_action/login.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
| parents | ccdf197b3f9b |
| children | f62c61bd912c |
| rev | line source |
|---|---|
| bsw/jbe@0 | 1 local member = Member:by_login_and_password(param.get('login'), param.get('password')) |
| bsw/jbe@0 | 2 |
| bsw/jbe@0 | 3 if member then |
| bsw/jbe@0 | 4 app.session.member = member |
| poelzi@152 | 5 db:query{ "UPDATE member SET last_login = now() WHERE id = ?", member.id } |
| bsw/jbe@0 | 6 app.session:save() |
| bsw/jbe@0 | 7 slot.select("notice", function() |
| bsw/jbe@0 | 8 ui.tag{ content = _'Login successful!' } |
| bsw/jbe@0 | 9 end) |
| bsw/jbe@0 | 10 trace.debug('User authenticated') |
| bsw/jbe@0 | 11 else |
| bsw@3 | 12 slot.select("error", function() |
| bsw/jbe@0 | 13 ui.tag{ content = _'Invalid username or password!' } |
| bsw/jbe@0 | 14 end) |
| bsw/jbe@0 | 15 trace.debug('User NOT authenticated') |
| bsw/jbe@0 | 16 return false |
| bsw/jbe@0 | 17 end |