Project

General

Profile

Download (484 Bytes) Statistics
| Branch: | Tag: | Revision:
a579432b Marc Dequènes (Duck)
class LogonController < ApplicationController
def index
render :action => "login"
end

def login
if request.post?
if session[:user_id] = User.authenticate(params[:login], params[:password])
flash[:message] = _("Login successful")
redirect_to_stored
else
flash[:warning] = _("Login unsuccessful")
end
end
end

def logout
session[:user_id] = nil
flash[:message] = 'Logged out'
edf9058a Marc Dequènes (Duck)
redirect_to root_path
a579432b Marc Dequènes (Duck)
end
end