Project

General

Profile

Download (484 Bytes) Statistics
| Branch: | Tag: | Revision:
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'
redirect_to root_path
end
end
(3-3/5)