liquid_feedback_frontend

diff app/main/index/_action/login.lua @ 0:3bfb2fcf7ab9

Version alpha1
author bsw/jbe
date Wed Nov 18 12:00:00 2009 +0100 (2009-11-18)
parents
children 768faea1096d
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/index/_action/login.lua	Wed Nov 18 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,16 @@
     1.4 +local member = Member:by_login_and_password(param.get('login'), param.get('password'))
     1.5 +
     1.6 +if member then
     1.7 +  app.session.member = member
     1.8 +  app.session:save()
     1.9 +  slot.select("notice", function()
    1.10 +    ui.tag{ content = _'Login successful!' }
    1.11 +  end)
    1.12 +  trace.debug('User authenticated')
    1.13 +else
    1.14 +  slot.select("notice", function()
    1.15 +    ui.tag{ content = _'Invalid username or password!' }
    1.16 +  end)
    1.17 +  trace.debug('User NOT authenticated')
    1.18 +  return false
    1.19 +end

Impressum / About Us